avatar.alex Posted May 29, 2008 Share Posted May 29, 2008 IDK why this isn't correct but can someone help me with this ALTER TABLE 'players' ADD 'jobcount' INT(11) default (3); IDK I want to add a jabcount to the players table but it wont let me? Link to comment https://forums.phpfreaks.com/topic/107725-altering-tables/ Share on other sites More sharing options...
amites Posted May 29, 2008 Share Posted May 29, 2008 I've gotten really bad about altering tables through PHP, if your just looking to get it done you could use PHP My Admin, if you're looking to learn sorry I can't help Link to comment https://forums.phpfreaks.com/topic/107725-altering-tables/#findComment-552289 Share on other sites More sharing options...
mdnghtblue Posted May 29, 2008 Share Posted May 29, 2008 It would help to know if it gave you an error when trying to run the query, but try this: ALTER TABLE 'players' ADD 'jobcount' INT(11) default '3'; Link to comment https://forums.phpfreaks.com/topic/107725-altering-tables/#findComment-552609 Share on other sites More sharing options...
fenway Posted May 30, 2008 Share Posted May 30, 2008 No paren around the default value... Link to comment https://forums.phpfreaks.com/topic/107725-altering-tables/#findComment-553567 Share on other sites More sharing options...
avatar.alex Posted June 1, 2008 Author Share Posted June 1, 2008 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 ''players' ADD 'jobcount' INT(11) default '3'' at line 1 IDK wats going on? Link to comment https://forums.phpfreaks.com/topic/107725-altering-tables/#findComment-554575 Share on other sites More sharing options...
fenway Posted June 2, 2008 Share Posted June 2, 2008 You have single quotes around table names and columns... drop them. Link to comment https://forums.phpfreaks.com/topic/107725-altering-tables/#findComment-555507 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.