Problem with INSERT after software upgrade
| From: | Jarle Aase | Date: | Sat, 15 Jul 2000 07:49:58 +0000 |
| Subject: | Problem with INSERT after software upgrade | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-1161@lists.php.net to get a copy of this message | ||
I'm having some problems with INSERT queries after a software upgrade (from
Debain Linux Potato to Woody, causing mysql and php to be upgraded as well).
Current versions:
Debian GNU Linux "Woody" / kernel 2.2.17
MySQL 3.23.21-beta (Debian v. 10.8)
PHP Version 4.0.1pl2
Apache/1.3.12
The following error show the problem:
Warning: MySQL: Unable to save result set in lib/lib.php on line 23
SQL ERROR
INSERT INTO Session (UserID, LoginTime, HitCount, RemoteHost, Referer)
VALUES (1, NOW(), 1, '193.91.161.12:2792', '')
result=
The data is inserted into the database, but if I call mysql_insert_id() just
after the insertion, I just get a 0 (zero) back. Everything worked perefcty
well yesterday (until my harddisk suddenly believed that it was a dorbell,
and had to be replaced...)
The function that displays the error looks like this (SELECT queries works
perfectly well, so the global variables seems to be ok).
Function DoSQL($SQL)
{
global $db, $DbName;
$result = mysql_db_query($DbName, $SQL, $db);
if ($result == false)
{
echo("<P id=error>SQL ERROR<br>$SQL<BR>result=$result</P>");
echo mysql_error();
}
return $result;
}
Any help, tips and suggestions are wery welcome :)
(I've fund a number of queries on the same problem on deja, but no
solution).
Jarle
--
Jarle Aase email: jgaa@jgaa.com
Author of freeware. http://www.jgaa.com
(War FTP Daemon) news:alt.comp.jgaa
<<< no need to argue - just kill'em all! >>>