Grabbing newly enetered data from table once updated

Reply

Join Date: Jan 2008
Posts: 16
Reputation: BillyMako is an unknown quantity at this point 
Solved Threads: 0
BillyMako BillyMako is offline Offline
Newbie Poster

Grabbing newly enetered data from table once updated

 
0
  #1
Nov 3rd, 2008
I am putting together an inventory system which keeps count of the stock level.
I have the inventory database setup for example:

Product Stock_level
Battery1 25

Whenever "Battery 1" is bought, it adds a row to the "orders_products" table.

Is there a way where i can have an update button which will check to see if there are any new rows since the last press of the update button which will allow me to deduct 1 off the stock level of "Battery 1" ???

I hope I have made sense!
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 1,227
Reputation: kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about 
Solved Threads: 167
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Nearly a Posting Virtuoso

Re: Grabbing newly enetered data from table once updated

 
0
  #2
Nov 3rd, 2008
why don't you subtract one for the stock_level once the item is added to the orders_products table. thats how i would do it.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC