Select IN array?
| From: | Chris Lott | Date: | Sat, 14 Jul 2001 20:41:34 +0000 |
| Subject: | Select IN array? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-57902@lists.php.net to get a copy of this message | ||
I have an array of id numbers ($catids). I would like to select from the
mysql database all records where cid is in that array.
This syntax fails:
select * from categories
where cid in $catids
What is the correct way to do this? It can be done outside of a loop, can't
it?
c