Re: Code problem - need help.
| From: | Chase Urich | Date: | Sun, 12 Jan 2003 08:44:45 +0000 |
| Subject: | Re: Code problem - need help. | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-24783@lists.php.net to get a copy of this message | ||
> When I view on my web page, the $number value comes out fine, but the $name
> comes out as "Resource ID #x" where x is some number. Currently is says
> "Resource ID #6". I know the SQL syntax is right, I have tested it. But what
> is wrong here?
The mysql_query command returns a result set, not the 'value' of the
query. Look up the mysql_fetch_array
[http://us2.php.net/manual/en/function.mysql-fetch-array.php] and
mysql_fetch_row commands. There are also several variants of these that
return slightly different formats.
Chase