PHP mysql stock control program

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
HI i have a sever i setup myself it's a windows webserver for office
i'm beginer to php and mysql
i learn some php/mysql programing but i not that good
so i made up a project for a stock software for my personal knowleged
but i'm stuk on making it work the way i want it here i explaing how
the database setup

how can i make this work when i insert data in the
each time i enter the new imie number it's increment the and
the qty by one
let say i inser the follow

id  make  model         imei
1   nokia   6230          16997867867631743627

and the
dbqty should increment by one and if i sell dell one imei like i sell
one it should decrese by one
how can i set this up any idea please help

Re: PHP mysql stock control program

On Feb 3, 6:51=A0pm, wrote:
Quoted text here. Click to load it

There are a few ways to tackle this, personally I would do something



  item_sold (optional)

Each time you sell a stock item (phone), that entry would be removed
from the stock table (or marked as sold), as once that IMEI is sold,
it can never be sold again.

Then, to get the current stock level for a particular model, you can
issue a simple SQL query, such as SELECT count(*) AS stock_level FROM
tblStock WHERE manufacturer_id = x AND model_id = y

This also gives you some basic database normalisation.

Site Timeline