Google Base Query

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
andyhoneycutt
Forum Contributor
Posts: 468
Joined: Wed Aug 27, 2008 10:02 am
Location: Idaho Falls

Google Base Query

Post by andyhoneycutt »

Hi all. I've been researching this problem for about a week on and off now, and I am coming up with nothing. Here's what I'm trying to accomplish, in a nutshell. I'm building a query string to issue to Google Base ( Reference ), which does work and I do understand the syntax required here. Here's where I run into problems, though. I'm trying to query for a list of restaurants in a certain zip code. This works, however, when I attempt to add an additional condition to the query (in this case, the cuisine type), the query fails. I have attempted several ways of building this query and I am unable to gather results based on cuisine.

Have any of you played with Google Base enough that you might have some advice? Much appreciated in advance,
Andy Honeycutt.
User avatar
jazz090
Forum Contributor
Posts: 176
Joined: Sun Apr 12, 2009 3:29 pm
Location: England

Re: Google Base Query

Post by jazz090 »

shot in the dark but here it goes: have you tried swapping & (ampersand) with '&' when adding additional queries?
User avatar
andyhoneycutt
Forum Contributor
Posts: 468
Joined: Wed Aug 27, 2008 10:02 am
Location: Idaho Falls

Re: Google Base Query

Post by andyhoneycutt »

No I haven't. Thanks much, I'll try this and explain my results!

-Andy
User avatar
andyhoneycutt
Forum Contributor
Posts: 468
Joined: Wed Aug 27, 2008 10:02 am
Location: Idaho Falls

Re: Google Base Query

Post by andyhoneycutt »

Tried your suggestion, jazz090, but with the same results. Thanks much for the help! Any more ideas to consider?

-Andy
User avatar
jazz090
Forum Contributor
Posts: 176
Joined: Sun Apr 12, 2009 3:29 pm
Location: England

Re: Google Base Query

Post by jazz090 »

sorry man that was all i had.
User avatar
andyhoneycutt
Forum Contributor
Posts: 468
Joined: Wed Aug 27, 2008 10:02 am
Location: Idaho Falls

Re: Google Base Query

Post by andyhoneycutt »

Ah well, I'll perhaps sign up for a dev account (unfortunately to access more than G-Base costs money I don't really have) and see where that takes me.

Thanks again for your response!

-Andy
rwegoogling
Forum Newbie
Posts: 2
Joined: Thu Jul 30, 2009 3:40 pm

Re: Google Base Query

Post by rwegoogling »

andyhoneycutt,

have you found a solution to your problem? I am using the GoogleBaseQuery string property to execute searches through the Google Base API, but am not getting back my expected results.

Thanks,
RWE
rwegoogling
Forum Newbie
Posts: 2
Joined: Thu Jul 30, 2009 3:40 pm

Re: Google Base Query

Post by rwegoogling »

Actually, I just solved my problem (which was admittedly in my own code). In reference to the original issue in this thread, the GoogleBaseQuery string property is working as expected. Here are two search queries I'm using that work (each returning different results):

"latest" AND "nothing"
"latest" OR "nothing"

So far, I'm under the impression the API search works just like Google's main search. If you want to learn more about how to write advanced Google search queries, click on the "Advanced Search" link on Google's home page or find it at this address: http://www.google.com/advanced_search?hl=en

RWE
Post Reply