Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SQL, phpMyAdmin - edit database


svepe

Recommended Posts

Trying to add a contrib to my shop but I don?t remember how to add this to the databas with phpMyAdmin:

 

Add to the customers table:

customers_group_name (char 27) Default value: Retail

customers_group_id (int 11) Default value: 0

 

Create

products_groups table

 

Add to the products_groups table:

customers_group_id (int 11)

customers_group_price (decimal 15, 4)

products_id (int 11)

products_price (decimal 15,4)

 

 

Really frustrateing to forget stuff! So I ask and hopefully I?ll remember it to the next time... :)

 

Thanx for any help!

Link to comment
Share on other sites

You can either do it manually or you can run this sql, BUT PLEASE BACK UP YOUR DATABASE BEFORE YOU TRY!!!!!!!!!

 

alter table customers add customers_group_name char(27) default 'Retail' after customers_name;

alter table customers add customers_group_id int(11) default '1' after customers_group_name;



drop table if exists products_groups;

create table products_groups (

 customers_group_id int(11) default '0' not null ,

 customers_group_price decimal(15, 4) default '0.0000' not null ,

 products_id int(11) default '0' not null ,

 products_price decimal(15, 4) default '0.0000' not null ,

 PRIMARY KEY (customers_group_id)

);

Reddy to Rumble

 

Thank you osCommerce and all who Contribute to her!

Link to comment
Share on other sites

Yep, worked fine! THANX RUMBLE!! :)

 

It seems You know Your SQL, do You happend to know of any good beginners SQL manual? Would love to learn some but almost all mauals are too complex.. Or perhaps it?s me who?s to simple..? :)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...