deepshah2004 Posted January 19, 2009 Share Posted January 19, 2009 hello I have a sales table,purchases table and stock table some of the sales and purchases table entries need to be entered into the stock table as well how to do this. sales table fields: sales id(primary key),date,item code,description,customer name,customer account number, quantity,unit price,amount,discount,net amount and terms purchases table fields: purchases id(primary key),date,item code,description,supplier name,supplier code,quantity,unit price,amount,freight charges,discount,net amount and terms stock table fields: stock id(primary key),date,sales id(foreign key),purchases id(foreign key), quantity in, quantity out, reorder level quantity,minimum order quantity,balance quantity. I need the sales id of the sales table to also appear in stock table, also date to appear in date, quantity to appear in quantity out, and update the balance quantity in the stock table. I need the purchases id to appear in the stock table, date to appear in date, quantity to appear in quantity out, and to update the balance quantity. I am new at php Link to comment https://forums.phpfreaks.com/topic/141419-inserting-data-to-two-tables-simultaneously-in-different-fields/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.