|
Posted by linda on 11/17/06 18:43
sigh.... can anyone see where I've made the mistake?
$query = "INSERT INTO user_login
('name','email','date_of_birth','password','registration_date') VALUES
('$name', '$email', '$date_of_birth', MD5('$password'), NOW())";
$result = mysql_query($query);
if(!$result)
{
die("Query failed: $query - " . mysql_error());
}
elseif(mysql_affected_rows() == 0)
{
die("Query syntax OK, but no rows updated: $query");
}
mysql_close();
As I'm getting this error:
Query failed: INSERT INTO user_login
('name','email','date_of_birth','password','registration_date') VALUES
('linda', 'linda@anemailaddress.co.uk', '2006-1-1', MD5('test'), NOW()) -
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
''name','email','date_of_birth','password','registration_date') V
Navigation:
[Reply to this message]
|