[PHP] PHP and MySQL insert problem

2001-03-25 Thread Pinwang Chao

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.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP and MySQL insert problem

2001-04-02 Thread Richard Lynch

Perhaps http://php.net/FAQ.php#4.4 is the answer.

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: "Pinwang Chao" <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Sunday, March 25, 2001 6:36 PM
Subject: [PHP] PHP and MySQL insert problem


> 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.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]