webwolf Posted October 13, 2011 Share Posted October 13, 2011 Hi all, have playing around with plaincart to know more about php. When adding a new field to shop config database, started having syntax problems. The database is: CREATE TABLE IF NOT EXISTS `tbl_shop_config` ( `sc_name` varchar(50) NOT NULL DEFAULT '', `sc_address` varchar(100) NOT NULL DEFAULT '', `sc_phone` varchar(30) NOT NULL DEFAULT '', `sc_email` varchar(30) NOT NULL DEFAULT '', `sc_nif` int(10) NOT NULL DEFAULT '0', `sc_nibe` int(30) unsigned NOT NULL DEFAULT '0', `sc_currency` int(10) unsigned NOT NULL DEFAULT '1', `sc_shipping_cost` decimal(5,2) NOT NULL DEFAULT '0.00', `sc_order_email` enum('y','n') NOT NULL DEFAULT 'y' ) ENGINE=MyISAM DEFAULT CHARSET=utf8; i just added the field "sc_nibe" and now i get the 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 'sc_shipping_cost = 5.00, sc_currency = 1, sc_order_email = 'y'' at line 3" Tried a lot of things but nothing works. I'm using MySQL v5.0.7 Reaaly would apreciate some help. Many thanks Quote Link to comment https://forums.phpfreaks.com/topic/249034-plaincart-db-problem/ Share on other sites More sharing options...
trq Posted October 13, 2011 Share Posted October 13, 2011 Show us your query? Quote Link to comment https://forums.phpfreaks.com/topic/249034-plaincart-db-problem/#findComment-1278970 Share on other sites More sharing options...
webwolf Posted October 13, 2011 Author Share Posted October 13, 2011 Show us your query? Hi, sorry but i didn't understood the qestion. I forgot that i get this error in the plaincart admin problem when trying to change any value. Can be Name, Adress...any, always get the same error. Wait, now i think i understand your question; what happens when i click the SAVE button??? It calls a function modifyShopConfig(). I already updated the function with the new value "nibe" and also chenged the order values where called. Name was after Adress in the function but reversed in the table. Thank you for replying and pls...Help I already corrected several errors and can post them here for other people. Quote Link to comment https://forums.phpfreaks.com/topic/249034-plaincart-db-problem/#findComment-1278991 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.