thessrtech Posted October 25, 2005 Share Posted October 25, 2005 Create the blacklist table by executing the following SQL statement ALTER TABLE orders ADD cc_start varchar(4) default NULL AFTER cc_expires, ADD cc_issue varchar(3) default NULL AFTER cc_start, ADD cc_cvv varchar(4) default NULL AFTER cc_issue; ALTER TABLE `orders` CHANGE `cc_number` `cc_number` VARCHAR( 64 ) DEFAULT NULL DROP TABLE IF EXISTS card_blacklist; CREATE TABLE card_blacklist ( blacklist_id int(5) NOT NULL auto_increment, blacklist_card_number varchar(20) NOT NULL default '', date_added datetime default NULL, last_modified datetime default NULL, KEY blacklist_id (blacklist_id) ) TYPE=MyISAM; Here is the error I get. SQL query: ALTER TABLE `orders` CHANGE `cc_number` `cc_number` VARCHAR( 64 ) DEFAULT NULL DROP TABLE IF EXISTS card_blacklist MySQL said: Documentation #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 'DROP TABLE IF EXISTS card_blacklist' at line 3 Quote Link to comment Share on other sites More sharing options...
sonictrip.net Posted November 25, 2005 Share Posted November 25, 2005 Im getting this error as well, can anyone figure it out? Quote Link to comment Share on other sites More sharing options...
insomniac2 Posted November 26, 2005 Share Posted November 26, 2005 try adding a ; at the end like below ALTER TABLE `orders` CHANGE `cc_number` `cc_number` VARCHAR(64) DEFAULT NULL; or depending on what sql admin your using remove the quotes like below if above doesn't work ALTER TABLE orders CHANGE cc_number cc_number VARCHAR(64) DEFAULT NULL; 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.