I know I would use an array somehow but how can i do a select statement where status would = 1, 2 or 3
I have it like this and not working cause I know it needs an array:
$result1 = mysql_query("SELECT * FROM tools where status='1 || 2 || 3");
Use IN:
$array = array(1, 2, 3); $in = implode(',', $array); $query = "SELECT * FROM tools WHERE status IN ($in)";
Using IN did not work for me
Where I have status='?'
It has to = 1 or a 2 or a 3
$result1 = mysql_query("SELECT * FROM tools WHERE status='?'"); $memt = mysql_num_rows($result1);
Not even sure what IN is, but it didnt work
Well I am not sure what is diff from what you had and I used. : But this worked :
$result1 = mysql_query("SELECT * FROM tools WHERE status IN ($in)");
Basically, colname IN (a, b, c) is equivalent to colname=a OR colname=b OR colname=c