Reply to Re: date_of_birth function (a new question) RESOLVED

Your name:

Reply:


Posted by linda on 11/17/06 18:50

"linda" <n0spamF0rme@tiscali.co.uk> wrote in message
news:455e02f0_1@mk-nntp-2.news.uk.tiscali.com...
> 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
>

It's ok i've sorted it now, I removed the ticks around the fields names and
it work fine. Thank you for all your help J.O.Aho.

Have a great weekend,
Linda

[Back to original 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

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