Re: What is going on?!? PHP-MySQL query weirness
| From: | Doug Semig | Date: | Wed, 22 Nov 2000 19:19:57 +0000 |
| Subject: | Re: What is going on?!? PHP-MySQL query weirness | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-4670@lists.php.net to get a copy of this message | ||
I'm not saying this is the problem, but "date" is an SQL reserved word.
You might want to rename that column.
Doug
At 10:41 AM 11/22/00 -0600, John Guynn wrote:
>I have the following code: $result = mysql_query("SELECT Date FROM $dbname
>ORDER BY Date"); ($dbname is set to neon)
> $row = mysql_fetch_array($result);
>
>Pretty standard stuff right.
>
>When the code executes $row has 2 values in the array. The problem is when
>I go to the mysql command line and execute SELECT Date FROM neon ORDER BY
>Date; I get 49 rows in set as a result which is what I expect.
>
>I've never had the PHP code return less than the correct number of items.
>Also the values in $row are 1995-09-26 (the first date) and BLANK (nothing
>echos to the screen in $row[1]).
>
>Any ideas?
>
>John Guynn