I have two table. one is item table and the other is issue table. issue table uses foreign key reference to item_id.
I am using the issue tables to issue items to my employee and deduct the item quantity to my item table. No problem issuing the items and deducting the quantity on item table, What I want is when the quantity becomes zero the employee name will stop inserting values to the issue table. Because everytime I tried to issue the value is inserting in the issue table even the quantity in the item table is zero.
if row is greater than zero, do not proceed. else insert it to this table.
hope you understand.