You are here: Re: date_of_birth function (a new question) « All PHP « IT news, forums, messages
Re: date_of_birth function (a new question)

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация