[Developers] PHP Integration Problems

Chris Mahon darthmahon at gmail.com
Wed Jan 2 21:12:34 UTC 2008


Hi Chris,
Thanks for the reply. Starting to make more sense, I can't see how I would
use games_on_this_platform then? I.E. what can I do with it? My query was
the same as on the Query Builder/Editor which did return results so it was
odd that PHP did not. Anyway, I've made good progress and now have results
coming back!

One quick question though. I am adding a limit to my query, above the
default 100. However when I do this it does not return results for my query.
If I take the limit out, I get results. Any ideas? Is there a way of getting
it to return ALL matches without limit?

Query is now as follows:

$q2 = array(array("/common/topic/image" => array(array("optional" => true,
"id" => null)),
 "type" => "/cvg/computer_videogame",
 "name" => null,
 "id" => null,
 "sort" => "name",
 "release_date" => array(),
 "cvg_genre" => array(),
 "versions" => array("platform" => array("id" => null, "name" => null,
"name~=" => "Xbox 360")),
 "limit" => 150
));

Cheers,
Chris

On Jan 1, 2008 5:53 PM, Christopher R. Maden <crism at metaweb.com> wrote:

> 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/ >
> _______________________________________________
> Developers mailing list
> Developers at freebase.com
> http://lists.freebase.com/mailman/listinfo/developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freebase.com/pipermail/developers/attachments/20080102/374b6968/attachment.htm 


More information about the Developers mailing list