i want to decrease the field 'quantity' by the amount issued from the 'issuing page'.e.g. if 8 pens are in store,and i issue 2 and the stocks received table to have 6 in its 'quantity' field. please help me with the php code, i will really be grateful coz am so stuck!!!!!!!!!!!! thanks guys.
How do i update two tables in php: i want to update a table that stores stocks received once an item issued?
Get the values you need and then assign them to variables:
$quantity = %26lt;the quantity%26gt;;
$issued = %26lt;issued amount%26gt;;
$result = $quantity - $issued;
echo $result;
How you find out %26lt;the quantity%26gt; and %26lt;issued amount%26gt; will depend on how your tables are set up? Is a GET, POST, or MySQL?
If you describe your setup a bit better it would help.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment