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