[Developers] PHP Integration Problems
Christopher R. Maden
crism at metaweb.com
Tue Jan 1 17:53:57 UTC 2008
Chris Mahon <darthmahon at gmail.com> wrote:
> I'm currently building a search page for computer games and have come across
> some teething problems whilst using freebase.
>
> This is the query I based that on from within the freebase query builder:
>
> [{
> "type":"/cvg/cvg_platform",
> "games_on_this_platform":[{ "game":[{ "name":null }] }],
> "name":"Xbox 360"
> }]
Happy new year, Chris. The problem with using foreach on the result of that query is that it returns a single thing: the platform called “Xbox 360.” Now, it has a number of games on that platform, but the root of the query is just the platform itself.
You can turn the query inside-out, to find games whose platform is the Xbox 360, or you can iterate over the games on that platform, instead of iterating over the platform itself.
~Chris
--
Christopher R. Maden
Data Architect
Metaweb Technologies, Inc.
<URL: http://www.metaweb.com/ >
More information about the Developers
mailing list