?? Didn't you say that $access[1] contains sets such as "1,2,3,4,7,8"? Why compare it to "2"? _________________________ ----- Original Message ----- From: "peppe" <peppe1001@xxxxxxxxxxx> To: <php-db@xxxxxxxxxxxxx> Sent: Thursday, March 04, 2004 13:22 Subject: Re: SELECT > Hi > I made this query > $sql = "SELECT * FROM users WHERE FIND_IN_SET( 2, access ) > 0 "; > $result = mysql_query($sql); > $numRows = mysql_num_rows($result); > > for ($row =1; $row <= $numRows; $row++) { > $rowArray = mysql_fetch_array($result); > $access1 = $rowArray[1]; > > if ($access1 =='2'){ > echo "Access is 2 "; > } else { > echo "acces is not 2"; > } > } > > I get always access not 2 how can I make this If works > "Ignatius Reilly" <ignatius.reilly@xxxxxxx> wrote in message > news:002d01c401e0$8ec16e80$0100a8c0@xxxxxxxxx > > SELECT > > ... > > FROM users > > WHERE FIND_IN_SET( 2, values ) > 0 > > > > Ignatius > > _________________________ > > ----- Original Message ----- > > From: "peppe" <peppe1001@xxxxxxxxxxx> > > To: <php-db@xxxxxxxxxxxxx> > > Sent: Thursday, March 04, 2004 12:28 > > Subject: SELECT > > > > > > > Hi I have a table users with columns name email and access > > > In email I have values test@xxxxxxxx etc in access I have values > > 1,2,3,4,7,8 > > > How can I filter value 2 ? > > > Beacause I need only users with value 2 to send email > > > Greetings > > > > > > -- > > > PHP Database Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php