Jump to content

How to add table?


shinchan1969

Recommended Posts

I have purchased a mod for a arcade. This mod will allow users to use there points they get to buy items. In a earlier version of the arcade not the mod images where able to be shown, now that I have a newer arcade version the images do not. There is a area for items

 

"CREATE TABLE IF NOT EXISTS `ava_items_shop` (
  `id` INT( 11 ) NOT NULL AUTO_INCREMENT,
  `name` VARCHAR( 255 ) NOT NULL,
  `image` VARCHAR( 255 ) NOT NULL,
  `price` INT( 10 ) NOT NULL,
  `type` TINYINT( 4 ) NOT NULL,
  `active` TINYINT ( 1 ) NOT NULL,
  `category` VARCHAR( 255 ) NOT NULL DEFAULT 'None',
  `attribute` VARCHAR( 255 ) NOT NULL DEFAULT 'None',
  PRIMARY KEY ( `id` )
) ENGINE=MyISAM ;";

 

this is for the admin side pretty much as you can see there is a image above.

 

now for the user side table

 

"CREATE TABLE IF NOT EXISTS `ava_items_user` (
  `id` INT( 11 ) NOT NULL AUTO_INCREMENT,
  `item_id` INT( 11 ) NOT NULL,
  `user_id` INT( 11 ) NOT NULL,
  `active` TINYINT( 1 ) NOT NULL,
  `time` VARCHAR( 12 ) NOT NULL,
  PRIMARY KEY ( `id` )
) ENGINE=MyISAM ;";

 

I have tried to add the image table from above to this one and no go.

any help on this would be grateful.

I have added the 2 sql / php files that deal with the uploading of the sql to my server.

 

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/234763-how-to-add-table/
Share on other sites

Not sure what your wanting to know.

 

The two file you show are for making new tables for your arcade. The first (install.php) just makes those two tables. The second (convert.php) also makes those table if they don't exist and moves the contents of your old tables (ava_shopitems and ava_useritems)  into the new tables. A word of caution here; the convert.php script also deletes your old tables - you may not want that to happen untill you check that everything is working ok.

 

From what I see your images are in the old ava_shopitems table and will be moved into the new ava_items_shop by the convert.php script.

 

Have you run both of these scripts? if not wait!!! What exactly is your question?

Link to comment
https://forums.phpfreaks.com/topic/234763-how-to-add-table/#findComment-1206497
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.