Raised This Month: $32 Target: $400
 8% 

Adding item to the database


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
szogun
Senior Member
Join Date: Apr 2016
Old 08-25-2019 , 08:28   Adding item to the database
Reply With Quote #1

Hello
Looking for a store I came across a modified version of the store at which I have a problem to add items to the database https://build.kxnrl.com/Store/1.9/

PHP Code:
ALTER TABLE `store_item_child`
ADD `idlevarchar(32NOT NULL DEFAULT 'ITEM_NO_IDLE' COMMENT 'pet',
ADD `runvarchar(32NOT NULL DEFAULT 'ITEM_NO_RUN' COMMENT 'pet',
ADD `deathvarchar(32NOT NULL DEFAULT 'ITEM_NO_DEATH' COMMENT 'pet',
ADD `seedsmallint(5unsigned NOT NULL DEFAULT '0' COMMENT 'weaponskin',
ADD `wearttinyint(3NOT NULL DEFAULT '-1' COMMENT 'weaponskin',
ADD `paintsmallint(5unsigned NOT NULL DEFAULT '0' COMMENT 'weaponskin',
ADD `wearffloat(7,6unsigned NOT NULL DEFAULT '0.01' COMMENT 'weaponskin'

#1060 - Duplicate column name 'idle' 
szogun is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 08-25-2019 , 12:57   Re: Adding item to the database
Reply With Quote #2

Quote:
Originally Posted by szogun View Post
PHP Code:
#1060 - Duplicate column name 'idle' 
ALTER TABLE is meant to alter the table with new information, not to alter it with the full schema of how the new table should look like after the procecure.

Remove the
PHP Code:
ADD `idle` [...] 
line, and then continue removing all of the other columns that already exist in your current "store_item_child" table as well, to avoid the "Duplicate column name" error.
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:15.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode