Hi Chris,<div><br class="webkit-block-placeholder"></div><div>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!
</div><div><br class="webkit-block-placeholder"></div><div>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?
</div><div><br class="webkit-block-placeholder"></div><div>Query is now as follows:</div><div><br class="webkit-block-placeholder"></div><div><div>$q2 = array(array("/common/topic/image" => array(array("optional" => true, "id" => null)),
</div><div><span class="Apple-tab-span" style="white-space:pre">                                        </span> "type" => "/cvg/computer_videogame",</div><div><span class="Apple-tab-span" style="white-space:pre">                                        </span> "name" => null,
</div><div><span class="Apple-tab-span" style="white-space:pre">                                        </span> "id" => null,</div><div><span class="Apple-tab-span" style="white-space:pre">                                        </span> "sort" => "name",</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                        </span> "release_date" => array(),</div><div><span class="Apple-tab-span" style="white-space:pre">                                        </span> "cvg_genre" => array(),
</div><div><span class="Apple-tab-span" style="white-space:pre">                                        </span> "versions" => array("platform" => array("id" => null, "name" => null, "name~=" => "Xbox 360")),
</div><div><span class="Apple-tab-span" style="white-space:pre">                                        </span> "limit" => 150</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>));</div></div><div><br class="webkit-block-placeholder">
</div><div>Cheers,</div><div>Chris<br><br><div class="gmail_quote">On Jan 1, 2008 5:53 PM, Christopher R. Maden <<a href="mailto:crism@metaweb.com">crism@metaweb.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="Ih2E3d">Chris Mahon <<a href="mailto:darthmahon@gmail.com">darthmahon@gmail.com</a>> wrote:<br>> I'm currently building a search page for computer games and have come across<br>> some teething problems whilst using freebase.
<br>><br></div><div class="Ih2E3d">> This is the query I based that on from within the freebase query builder:<br>><br>> [{<br>> "type":"/cvg/cvg_platform",<br>> "games_on_this_platform":[{ "game":[{ "name":null }] }],
<br>> "name":"Xbox 360"<br>> }]<br><br></div>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.
<br><br>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.<br><br>~Chris<br>--<br><font color="#888888">
Christopher R. Maden<br>Data Architect<br>Metaweb Technologies, Inc.<br><URL: <a href="http://www.metaweb.com/" target="_blank">http://www.metaweb.com/</a> ><br>_______________________________________________<br>Developers mailing list
<br><a href="mailto:Developers@freebase.com">Developers@freebase.com</a><br><a href="http://lists.freebase.com/mailman/listinfo/developers" target="_blank">http://lists.freebase.com/mailman/listinfo/developers</a><br></font>
</blockquote></div><br></div>