Re: Problem with MySQL.
| From: | Joao Prado Maia | Date: | Thu, 12 Oct 2000 17:29:08 +0000 |
| Subject: | Re: Problem with MySQL. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-19852@lists.php.net to get a copy of this message | ||
On Thu, 12 Oct 2000, Pascal Girard wrote:
> Hi,
>
> I have upgraded php to version 4.0.2 (debian package distribution) this
> morning and since the upgrade, when I do an UPDATE, DELETE or INSERT
> through mysql_db_query, the function returns an error and php outputs a
> warning of the type:
> Warning: MySQL: Unable to save result set in functions/replace.php on
> line 72
>
> Is there a way to disable the warning?
>
Yes, you can use the @ operator (or whatever this is ;) in the front of
the function that is giving you this error. For instance :
$result = mysql_query("SELECT broken FROM ", $conn);
$rows = mysql_num_rows($result);
That is clearly a broken query, and MySQL is going to give you an error
when you try the second line. But if you do this, it won't :
$result = @mysql_query("SELECT broken FROM ", $conn);
$rows = @mysql_num_rows($result);
Regards,
Joao
--
Joao Prado Maia
Web Developer
Kefta, Inc.
T: (415) 391-6881 ext 8008
F: (415) 391-7079