• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Gersior MySQL item shop error

RockeTBunnYz

Trainee in progress
Joined
Jan 21, 2015
Messages
137
Reaction score
7
Location
sweden
Hi, i was follow this thread http://otland.net/threads/adding-offer-to-shop-gesior-acc.39908/ to add offer into my Gersior 2012 tfs 0.4 item shop. but got a error when i gonna insert the SQL can anyone help me out what its wrong i have been sreaching and try also of think but i cannot get it to work. please help !
i got this error when try to insert SQL
Code:
Error
SQL query: [IMG]http://localhost/us_opt1/themes/dot.gif[/IMG]


SELECT * FROM `z_shop_offer` WHERE 1
INSERT INTO `z_shop_offer` (`1`, `80`, `itemid1`, `1`, `0`, `0`, `item`, `A Nightmare Sabre 75 Atk and 45 defense Two-handed">`, `Nightmare Sabre">`) VALUES
(1, 5, 2517, 1, 0, 0, 'item', 'Buy a shield of honour!', 'Shield of Honour')
LIMIT 0, 300



MySQL said: [IMG]http://localhost/us_opt1/themes/dot.gif[/IMG]

#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 'INSERT INTO `z_shop_offer` (`1`, `80`, `itemid1`, `1`, `0`, `0`, `item`, `A Nigh' at line 2
 
Let me explain this for you,

The 1st part of this query is the table z_shop_offer which holds these columns id, points, itemid1, count1, itemid2, count2, offer_type, offer_description, offer_name
If your table z_shop_offer does not have these columns you will need to add them, the 1st part you don't edit.
Code:
INSERT INTO `z_shop_offer` (`id`, `points`, `itemid1`, `count1`, `itemid2`, `count2`, `offer_type`, `offer_description`, `offer_name`)

The second part of this query is the values you will be adding to that table and its columns, you can edit these values.

Numbers do not need single ( ' ) or double quotes ( " ), on the other hand text always does and if the text contains a single or double quote then you can use an escape string \' for single or \" for double quotes.
Example: "Hi I'm very happy to see \"you\"!" or 'Hi I\'m very happy to see "you"!'
Code:
VALUES
(1, 5, 2517, 1, 0, 0, 'item', 'Buy a shield of honour!', 'Shield of Honour');

So now hopefully you understand what this query means and how to apply it
Code:
INSERT INTO `z_shop_offer` (`id`, `points`, `itemid1`, `count1`, `itemid2`, `count2`, `offer_type`, `offer_description`, `offer_name`) VALUES
(1, 5, 2517, 1, 0, 0, 'item', 'Buy a shield of honour!', 'Shield of Honour');

Hope this has helped :)
 
Last edited:
Let me explain this for you,

The 1st part of this query is the table z_shop_offer which holds these columns id, points, itemid1, count1, itemid2, count2, offer_type, offer_description, offer_name
If your table z_shop_offer does not have these columns you will need to add them, the 1st part you don't edit.
Code:
INSERT INTO `z_shop_offer` (`id`, `points`, `itemid1`, `count1`, `itemid2`, `count2`, `offer_type`, `offer_description`, `offer_name`)

The second part of this query is the values you will be adding to that table and its columns, you can edit these values.

Numbers do not need single ( ' ) or double quotes ( " ), on the other hand text always does and if the text contains a single or double quote then you can use an escape string \' for single or \" for double quotes.
Example: "Hi I'm very happy to see \"you\"!" or 'Hi I\'m very happy to see "you"!'
Code:
VALUES
(1, 5, 2517, 1, 0, 0, 'item', 'Buy a shield of honour!', 'Shield of Honour');

So now hopefully you understand what this query means and how to apply it
Code:
INSERT INTO `z_shop_offer` (`id`, `points`, `itemid1`, `count1`, `itemid2`, `count2`, `offer_type`, `offer_description`, `offer_name`) VALUES
(1, 5, 2517, 1, 0, 0, 'item', 'Buy a shield of honour!', 'Shield of Honour');

Hope this has helped :)

so how do you add table and columns in z_shop_offer
i only have this line in myphpadmin z_shop_offer
Code:
SELECT * FROM `z_shop_offer` WHERE 1
 
so how do you add table and columns in z_shop_offer

Code:
CREATE TABLE `z_shop_offer` (
`id` int(11) NOT NULL auto_increment,
`points` int(11) NOT NULL default '0',
`itemid1` int(11) NOT NULL default '0',
`count1` int(11) NOT NULL default '0',
`itemid2` int(11) NOT NULL default '0',
`count2` int(11) NOT NULL default '0',
`offer_type` varchar(255) default NULL,
`offer_description` text NOT NULL,
`offer_name` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

Source: http://otland.net/threads/ver-0-1-0-gesior-item-pacc-shop-php-lua-for-tfs.5772/
 
Code:
CREATE TABLE `z_shop_offer` (
`id` int(11) NOT NULL auto_increment,
`points` int(11) NOT NULL default '0',
`itemid1` int(11) NOT NULL default '0',
`count1` int(11) NOT NULL default '0',
`itemid2` int(11) NOT NULL default '0',
`count2` int(11) NOT NULL default '0',
`offer_type` varchar(255) default NULL,
`offer_description` text NOT NULL,
`offer_name` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

Source: http://otland.net/threads/ver-0-1-0-gesior-item-pacc-shop-php-lua-for-tfs.5772/
i got it to work thanks :p
 
Back
Top