Bug #12394 Updated: Select statement
| From: | peter-h dot hoffmann at dil dot de | Date: | Fri, 27 Jul 2001 12:45:48 +0000 |
| Subject: | Bug #12394 Updated: Select statement | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-61205@lists.php.net to get a copy of this message | ||
ID: 12394
User updated by: peter-h.hoffmann@dil.de
Reported By: peter-h.hoffmann@dil.de
Status: Open
Bug Type: MySQL related
Operating System: Windows NT4.0
PHP Version: 4.0.6
New Comment:
Excuse me, but this was a bloody amateur failure !!!
The result is an object, so what to do is:
for ($count = 1; $row = mysql_fetch_object($result); ++$count){ echo $row->col_name_1; echo
$row->col_name_2 ... }
:-)))
Previous Comments:
------------------------------------------------------------------------
[2001-07-26 07:42:31] peter-h.hoffmann@dil.de
I don't know if it is really a bug, but something is going on.
If I make a mysql select statement:
mysql> select * from table_name where row_name like "%searchstring%";
then it shows the correct result!
the same within php:
$sql="select * from table_name where row_name like \"%searchstring%\";
$result=mysql_query($sql);
then it shows an incorrect result!
Another hint for you:
I use the Xitami Webserver Version 2.5b4, it doesn't work with the <FORM
ACTION="program.php" METHOD="POST">.
I change to Version 2.5b5 now it works great!
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=12394&edit=1