Re: Newbie mysql question
| From: | Hans Lellelid | Date: | Fri, 19 Jul 2002 21:24:51 +0000 |
| Subject: | Re: Newbie mysql question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-108581@lists.php.net to get a copy of this message | ||
You could do something like:
$query = mysql_query("SELECT id FROM ma_users WHERE
user='$PHP_AUTH_USER'");
list($id) = mysql_fetch_row($query);
HTH,
Hans
On Fri, 2002-07-19 at 16:47, John Wulff wrote:
> If i KNOW this query will only return one "piece" of data, what, php'ly
> speaking, must i do to assign it to the var $id?
>
> SELECT id FROM ma_users WHERE user='$PHP_AUTH_USER'
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>