PHP and MySQL insert problem
| From: | Pinwang Chao | Date: | Sun, 25 Mar 2001 23:56:46 +0000 |
| Subject: | PHP and MySQL insert problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-45538@lists.php.net to get a copy of this message | ||
Can any one help me with the following problem?
I have a very simple query:
...
$sql="insert into tt (a, b) values ('1', '2')";
$result=mysql_query($sql);
...
I always got the following error message when I run it from my browser.
Warning: MySQL: Unable to save result set in /usr/local/apache/htdocs/tt.php
on line 9
But even with this message, the values are still inserted into tt.
When I change $sql to &sql="select * from tt";
There were no such error message.
It puzzled me? Why?
My system: PHP 4.0.4pl1, MySQL 3.23.32
Thanks in advance.