Re: comparing data in a table to user data
hmm I tried to use the ON DUPLICATE KEY UPDATE
in the table pending web is the primary, web and email are both unique.
----------------------------------------
$sql = "INSERT INTO `pending` (name, lan, web, last_name,email)
VALUES ('$name', '$hostname', '$web', '$lastname', '$email')
ON DUPLICATE KEY UPDATE name='$name', web='$web', email='$email' ";
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'ON DUPLICATE KEY UPDATE name='test', web='www.test.com', ema
----------------------------------------
ON DUPLICATE KEY UPDATE doesn't look wrong to me and the values are not empty. I am using version 3.42 but it all looks good, any tips?
Edited 2 time(s). Last edit at 04/05/2006 02:59PM by deliverance1957.