View Single Post
  #3 (permalink)  
Old 02-26-2008, 10:43 AM
mel mel is offline
Junior Member
 
Join Date: Feb 2008
Posts: 11
Default

Thanks for that, but what I'm really looking for is how to use "in" specifically.

For some reason, query() doesn't seem to be returning any results, so I'm now using fetchAll().

So, the following returns all records for user 2:

$sql = 'SELECT * FROM table WHERE user_id in (?)';
$result = $db->fetchAll($sql, 2);

But I want all records for users 2, 3, and 4.
Reply With Quote