Re: Querying a database for 50 users' information: 50 queries or a WHERE array?
| From: | Dotan Cohen | Date: | Tue, 13 Sep 2011 19:37:30 +0000 |
| Subject: | Re: Querying a database for 50 users' information: 50 queries or a WHERE array? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-314812@lists.php.net to get a copy of this message | ||
On Tue, Sep 13, 2011 at 17:32, muad shibani <muad.shibani@gmail.com> wrote:
> Yes there is but all the IDs in one string like this
> $ids = $id1.', '.$id2.', ' ;
> note : remove the last comma from the string
> the make the query like this:
> mysql_query("SELECT * FROM table WHERE
> userID= in($ids ) }
Thank you Muad!
--
Dotan Cohen
http://gibberish.co.il
http://what-is-what.com