Re: error with REPLACE or UPDATE
| From: | CC Zona | Date: | Wed, 24 Jan 2001 16:03:51 +0000 |
| Subject: | Re: error with REPLACE or UPDATE | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-36426@lists.php.net to get a copy of this message | ||
In article <3A6EB3B2.74086789@bluewin.ch>, mfourny@bluewin.ch wrote:
<snip>
> $connect = mysql_connect(xxxxxx); or die ("dBase not connect.")
<snip>
> $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\"";
Check the manual at mysql.com for the "REPLACE" syntax. It's used like
"INSERT", not "UPDATE".
--
CC