Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

adding a new table to osc


jloyzaga

Recommended Posts

Posted

I tried adding this to my DB

ALTER TABLE `products` ADD `artists_id` INT(11) DEFAULT NULL AFTER `manufacturers_id`;

ALTER TABLE products` ADD INDEX (`artists_id`);

CREATE TABLE `artists` (

`artists_id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,

`artists_name` VARCHAR(32) NOT NULL,

`artists_phone1` VARCHAR(20) DEFAULT NULL,

`artists_phone2` VARCHAR(20) DEFAULT NULL,

`artists_fax` VARCHAR(20) DEFAULT NULL,

`artists_email` VARCHAR(20) DEFAULT NULL,

`artists_url` VARCHAR(60) DEFAULT NULL,

`artists_comments` VARCHAR(255) DEFAULT NULL,

`date_added` DATETIME DEFAULT NULL,

`last_modified` DATETIME DEFAULT NULL

)

COMMENT = 'artists table add-in';

But I obviously couldn't

 

Could somebody check this out and if possible grab my latest b/u and apply this to it coz its not working for me!!!!!!

 

Please email me for the DB and update

Joe

Posted

Your syntax looks correct.

 

Do you get an error message or what happens?

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Posted

It seems fine when I create it locally but I cant understand how to get phpmyadmin to re-generate the .sql file to upload to my site to restore - can you help?

Posted

Why not just post the code into an SQL window on your server?

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Archived

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

×
×
  • Create New...