Jump to content

[SOLVED] Where with a large series of zip codes


cooldude832

Recommended Posts

I am trying to test for certain postings in my table that have a zip code equal to a larege list of zip codes

so my query would look like

 


select myfield from `postings` where zip = '12345' || zip = '45678' || zip = '166666' etc. etc.  AND USER = $userid

 

There is my problem I want it to be any of those zip but the user must be that user id, so if I have || || || it will be true on any user so long as it finds a matching zip right?

 

can I do something like

 

select myfield from `postings` where zip = ('12345' || '45678' || '66666')  AND USER = $userid

 

But I dont know the proper sytnax

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.