I have 2 tables that I am trying to insert data into using PHP
Table: WINE
-----------------------------------------------------------------
| wine_id | wine_type | country | indicator | color |
-----------------------------------------------------------------
wine_id is auto incremented, then This is my other table
Table: stock
--------------------------------------
| stock_id | wine_id | quantity |
--------------------------------------
For the STOCK table I have stock ID as Auto incremented and wine_id is foreign-key so All i need to insert is quantity.
I have a syntax like this:
$sql = mysql_query("INSERT INTO TABLE1(field1, field2, field3) VALUES('value1',value2,value3) INSERT INTO STOCK(field) VALUES ('value1')");
If there is another way to do so please suggest and I would like some examples please.