I want to insert into multiple tables in same query by using BEGIN and COMMIT.
It seems the error occur at begin.
here is my SQL command
BEGIN
INSERT INTO Product (pName, pBrand, pCategory, pSize, pQuantity, pPrice, pDetail)
VALUES('$name', '$brand', '$category', '$size', '$quantity', '$price', '$detail')
INSERT INTO Image (iName, iExt, iSize, pID)
VALUES('$img_name', '$img_ext', '$img_size', LAST_INSERT_ID());
COMMIT;