|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-08-20 06:18 UTC] sniper@php.net
[2002-06-30 04:37 UTC] akujin11 at yahoo dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 18 20:00:01 2025 UTC |
We recently upgraded to MySQL 3.23.21-beta and php 4.01pl2 (Apache 1.3.12, Debian v.10.8 Debian GNU Linux "Woody"). INSERT statements no longer work using the mysql_query() . The return value is always 0. UPDATE, and SELECT seem to work fine. In addition, INSERT seems to work OK using mysql_db_query() .Others have reported this same exact problem on phpbuilder.com mailing list archive. In addition, all php scripts on the upgraded machine using INSERT and mysql_query experience the same problem (for example phpMyAdmin). Here is some sample code: $user= "demo"; $host= "localhost"; $password= "mypassword"; $database= "mydatabase"; $connection = mysql_connect($host,$user,$password)or die("No Connection"); mysql_select_db($database, $connection)or die("Can't Select Database"); $addrow = "INSERT INTO test VALUES ('$name1', '$name2')"; $result= mysql_query($addrow, $connection) or die("Can't Add Selections to Test Table"); If I remove the die() in the last statement and check the value of $result, it always returns a 0.