Can someone please inform me where do I ad " INSERT INTO table (a,b,c) VALUES (1,2,3)
ON DUPLICATE KEY UPDATE id=LAST_INSERT_ID(id), c=3;
"
I am trying to have it set up that if the records exsists already it will just update the info in mysql.
$insert = "INSERT INTO almclmb8 (contact_name, email, login, passw, time, contact_phone)
VALUES ('".$name."','".$email."','".$login."','".$password."','".$time."','".$phone."')";
$result = mysql_query($insert) or die(mysql_error());
mysql_query($query);
if (!$result) {
$message = 'Invalid query: ' . mysql_error() . "\n";
$message .= 'Whole query: ' . $query;
die($message);
}
echo $query;
"('','{$contact_name}','{$email}','{$login}','{$passw}','{$time}','{$contact_phone}')";
// Perform Query
$result = mysql_query($query);
?>