0
$sql = "CREATE TABLE heros (
ID int NOT NULL AUTO_INCREMENT PRIMARY KEY,
battletag varchar(64) ,
name varchar(32),
id int,
level int,
hardcore bool,
gender bool,
dead bool,
class varchar(32),
updated TIMESTAMP
";

Getting an error:

Error creating table: 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 '' at line 11

2
  • 2
    It's not a error with a timestamp, it's you lost the ) Commented Jun 19, 2014 at 0:44
  • I have no excuses for myself. Thank you. Commented Jun 19, 2014 at 0:45

1 Answer 1

1

You're forgetting your closing ) character. Cleaned:

CREATE TABLE heros (
    ID int NOT NULL AUTO_INCREMENT PRIMARY KEY,
    battletag varchar(64) ,
    name varchar(32),
    id int,
    level int,
    hardcore bool,
    gender bool,
    dead bool,
    class varchar(32),
    updated TIMESTAMP
)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.