Re: SELECT
| From: | peppe | Date: | Thu, 04 Mar 2004 12:36:28 +0000 |
| Subject: | Re: SELECT | ||
| References: | 1 2 3 4 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-33294@lists.php.net to get a copy of this message | ||
Sorry my foult I don't need to compare you are right
Thank you very much
"Ignatius Reilly" <ignatius.reilly@free.fr> wrote in message
news:005e01c401e4$e6c88a10$0100a8c0@server...
> ??
> 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@hotmail.com>
> To: <php-db@lists.php.net>
> Sent: Thursday, March 04, 2004 13:22
> Subject: Re: [PHP-DB] 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@free.fr> wrote in message
> > news:002d01c401e0$8ec16e80$0100a8c0@server...
> > > SELECT
> > > ...
> > > FROM users
> > > WHERE FIND_IN_SET( 2, values ) > 0
> > >
> > > Ignatius
> > > _________________________
> > > ----- Original Message -----
> > > From: "peppe" <peppe1001@hotmail.com>
> > > To: <php-db@lists.php.net>
> > > Sent: Thursday, March 04, 2004 12:28
> > > Subject: [PHP-DB] SELECT
> > >
> > >
> > > > Hi I have a table users with columns name email and access
> > > > In email I have values test@test.com 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
> >
> >