what is wrong with this simple query?
| From: | Phil Schwarzmann | Date: | Tue, 25 Jun 2002 02:03:26 +0000 |
| Subject: | what is wrong with this simple query? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-103713@lists.php.net to get a copy of this message | ||
Here is my code...
$query = "SELECT max(id) FROM bc_topic";
$result = mysql_query($query);
$temp = mysql_result($result, 0, "id"); <- this is line 8
echo $temp[id];
Here is the error I get ...
Warning: id not found in MySQL result index 2 in /.../upload2.php on
line 8
What am I doing wrong here?
I know for sure that there definately is a column named 'id' and it's
the primary key and also an auto_increment.