error with REPLACE or UPDATE

From: Date: Wed, 24 Jan 2001 10:51:30 +0000
Subject: error with REPLACE or UPDATE
Groups: php.general 
Request: Send a blank email to php-general+get-36393@lists.php.net to get a copy of this message
Hello, I getting dificulties with an updating records procedure: like I have an Auto-Increment field I try to use the REPLACE (but without the the auto-increment I tried also UPDATE). I checked also the variables with an echo, and also all the usual things I could imagine... Now I am quite desperate. Here you are my code. Thanks to evrybody Marc $connect = mysql_connect(xxxxxx); or die ("dBase not connect.") $db = mysql_select_db("dBASE", $connect) or die ("dBase not select."); $total_price = $qty * $price; $date = date("Y-m-d"); $sql = "REPLACE CLIENT SET ID = \"$id\", ITEM = \"$item\", TITLE =\"$title\", AUTHOR = \"$author\", PUBLISHER = \"$publisher\", DELIVERY = \"$delivery\", QTY = qty\", PRICE = \"$price\", TOTAL_PRICE = \"$total_price\", DATE = \"$date\", RECORD\"$record\" WHERE RECORD = \"$record\""; $sql_result = mysql_query($sql,$connect) or die ("Couldn't update!");

« previous php.general (#36393) next »