I have an array with zipcodes indexed by distance. now i need to select pizza shops based on the zips, some thing like:
ziparray[]
foreach loop
SELECT * FROM location WHERE food='pizza' and zip='ziparray[]'
//do stuff
The zip array can grow up to 30 or 40 zips in time, which means 30 or 40 querys. Is there a better way to do this? i'm hoping to figure out Stored Procedures this way I can just send the parms in and have it send back the data(if i can).