PewN Posted September 7, 2012 Posted September 7, 2012 (edited) how can i make a sql table like create a table on a text my sql. id | character id | item_id | quantity like this CREATE TABLE IF NOT EXISTS `guildpack` ( `id` int(11) NOT NULL auto_increment, `account_id` int(11) NOT NULL default '0', `name` varchar(23) NOT NULL default '', `last_ip` varchar(100) NOT NULL default '', PRIMARY KEY (`account_id`), KEY (`id`) ) ENGINE=MyISAM; i already make but i don't know if this is correct CREATE TABLE IF NOT EXISTS `claimreward` ( `id` int(11) NOT NULL auto_increment, `char_id` int(11) NOT NULL default '0', `item_id` int(11) NOT NULL default '', `quantity` int(11) NOT NULL default '', PRIMARY KEY (`character_id`), KEY (`id`) ) ENGINE=MyISAM; Edited September 7, 2012 by bVersatile Quote
Peopleperson49 Posted September 7, 2012 Posted September 7, 2012 Put this inside your script somewhere. I wrote this at work and it has not been tested, but I think its okay. So somebody please correct if necessary. Peopleperson49 function createTable { query_sql("CREATE TABLE IF NOT EXISTS `claimreward` (`id` int(11) NOT NULL auto_increment,`char_id` int(11) NOT NULL default '0',`item_id` int(11) NOT NULL default '',`quantity` int(11) NOT NULL default '',PRIMARY KEY (`character_id`),KEY (`id`) ) ENGINE=MyISAM; OnInit: createTable(); end; Quote
Question
PewN
how can i make a sql table like create a table on a text my sql.
like this
i already make but i don't know if this is correct
Edited by bVersatile1 answer to this question
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.