shamuraq Posted January 2, 2012 Share Posted January 2, 2012 Hi guys, I have been using the "CREATE TABLE IF NOT EXISTS" with no problem until today... It keeps on giving me error. So i logged in to my phpMyAdmin to test it out on the sql console and it responded with #1064 - 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 '"CREATE TABLE IF NOT EXISTS `email@email.com` ( `id` INT( 7 ) NOT NULL AUTO_IN' at line 1 this is the syntax that i used on phpMyAdmin: "CREATE TABLE IF NOT EXISTS `email@email.com` ( `id` INT( 7 ) NOT NULL AUTO_INCREMENT PRIMARY KEY , `ref` VARCHAR ( 200 ) NOT NULL , `date` VARCHAR(10) NOT NULL , `time` VARCHAR(10) NOT NULL , `action` TEXT , `score` VARCHAR(4), `credit_charge` INT( 4 ) NOT NULL , ) ENGINE = innodb;"; i referred to the error that phpMyAdmin returned (error #1064) and found out it highly likely the usage of reserved keyword (http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html). But i cannot find any reserved keyword that i could've used in my query so far... Any ideas? Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted January 2, 2012 Share Posted January 2, 2012 Please tell me you aren't creating a new table for each user. Quote Link to comment Share on other sites More sharing options...
shamuraq Posted January 2, 2012 Author Share Posted January 2, 2012 yupp... Quote Link to comment Share on other sites More sharing options...
fenway Posted January 3, 2012 Share Posted January 3, 2012 yupp... You need to burn whatever book told you to do so. Quote Link to comment Share on other sites More sharing options...
AyKay47 Posted January 3, 2012 Share Posted January 3, 2012 yupp... Good luck with that. yupp... You need to burn whatever book told you to do so. Enough said. Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted January 3, 2012 Share Posted January 3, 2012 I once worked at a company that created a database for every user.... wow.... If you create a table for every user or in my case it was a database, every time you change the table/database you will need to change ALL of them, not just one, and if you forget to change one then the person that owns that table/database will get lots of errors, and you will have a mess on you hands. Quote Link to comment Share on other sites More sharing options...
fenway Posted January 4, 2012 Share Posted January 4, 2012 As though that's the only problem... Quote Link to comment Share on other sites More sharing options...
shamuraq Posted January 6, 2012 Author Share Posted January 6, 2012 Please advise me on what are the complications i could encounter if i do a table for every user? I am still learning the ropes and would appreciate the guidance... Quote Link to comment Share on other sites More sharing options...
fenway Posted January 6, 2012 Share Posted January 6, 2012 Let's flip the tables around -- why do you think it's a good idea? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.