Jump to content

ervisboy007

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ervisboy007's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, thanks for the warning, but now, I have another error Error: 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 'CURDATE(), PRIMARY KEY (MemberID) )' at line 7 $tableSQL = "CREATE TABLE Members ( MemberID int(11) unsigned NOT NULL auto_increment, UserName varchar(30) NOT NULL default '', PassWord varchar(32) NOT NULL default '', EMail varchar(50), JoinDate date NOT NULL DEFAULT CURDATE(), PRIMARY KEY (MemberID) )"; $sqlquery = "INSERT INTO Members (UserName, PassWord, EMail) VALUES('$username', '$password', '$email')"; Should I use unsigned for the JoinDate too? Thanks, Ervisboy007
  2. SOLVED: $sqlquery = "INSERT INTO Members (UserName, PassWord, EMail, JoinDate) VALUES('$username', '$password', '$email', '$joindate')"; yes, the problem were the single quotations -- i forget them
  3. Hi, this is what I get: username, password, email, joindate tester test test@hotmail.com 04-Mar-2010 An error occured: 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 '@hotmail.com, 04-Mar-2010)' at line 2
  4. Hi, I change it to varchar(45) but I still think that that's not the problem. An error occured: 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 '@hotmail.com, 03-Mar-2010)' at line 2 does MySQL have a special datatype for emails? maybe the '@' is causing the problem? could it be that my table is setup wrong? Thanks, Ervisboy007
  5. Hi, $tableSQL = "CREATE TABLE Members ( UserName varchar(15), PassWord varchar(15), EMail varchar(15), JoinDate varchar(15) )" $sqlquery = "INSERT INTO Members (UserName, PassWord, EMail, JoinDate) VALUES($username, $password, $email, $joindate)"; When I use my form to register an account, I get this: "An error occured: 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 '@hotmail.com, 03-Mar-2010)' at line 2" Here is the site if you want to take a look at: http://cegames.megabyet.net/Sancum/register.html Thanks, Ervisboy007 EDIT: MySQL version 5.0.87-community-log PHP version 5.2.11
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.