note 28837 added to function.mysql-fetch-array
| From: | c dot bock at qbiz dot de | Date: | Sat, 25 Jan 2003 12:08:01 +0000 |
| Subject: | note 28837 added to function.mysql-fetch-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-42725@lists.php.net to get a copy of this message | ||
I have a small table, having only two columns (id + name). For keeping
my PHP code general, i executed the following SQL Statement:
"select name, id, 1 from tablename"
The Result was:
+----+------+---+
| id | name | 1 |
+----+------+---+
| 1 | 1 | 1 |
| 2 | 1 | 1 |
| 3 | 1 | 1 |
| 4 | 1 | 1 |
+----+------+---+
Later on, i tried the same statement with 0 instead of 1, and the id was all set to 0.
The workaraound, i found was writing "select name, id, 1 as type from tablename", which
worked fine for me.
I've checked, if mySQL delivers a correct result and it does. I have not checked, if this is a
general database problem.
--
http://www.php.net/manual/en/function.mysql-fetch-array.php
http://master.php.net/manage/user-notes.php?action=edit+28837
http://master.php.net/manage/user-notes.php?action=delete+28837
http://master.php.net/manage/user-notes.php?action=reject+28837