i want to create a stock count for my products

can some one direct me to somewhere where i can find information on how to create a stock count for my products, and it should alter after a sale is made.

this is currently my products sql

[php]$sqlCommand = "CREATE TABLE products (
id int(11) NOT NULL auto_increment,
product_name varchar(255) NOT NULL,
price varchar(16) NOT NULL,
details text NOT NULL,
category varchar(16) NOT NULL,
subcategory varchar(16) NOT NULL,
m_tag text NOT NULL,
date_added date NOT NULL,
PRIMARY KEY (id),
UNIQUE KEY product_name (product_name)
) ";[/php]
i think i need to add a (stock level) to that.

also i want to create a best seller list on my home page, so do i need to create a (total no sold)

can some one direct me where i need to start looking.

p.s. im completely new to this

Sponsor our Newsletter | Privacy Policy | Terms of Service