Jump to content

This should be simple..


merveilles

Recommended Posts

This is probably really simple.. I have a php array, and right now I'm using foreach to get each item, and look it up in a database. So like...

 

foreach($list as $item){

mysql_query("select id where random = '$item'");

}

 

It seems inefficient to do that if there are like 100 items in the array.. Is there a way I can get each specific id for each item using only one mysql query?

Link to comment
https://forums.phpfreaks.com/topic/202013-this-should-be-simple/
Share on other sites

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.