Jump to content

Plaincart dB problem


webwolf

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.