I have a problem with 3 InnoDB tables in MySQL linked with a foreign key, My tables are:
Table1 name - products
PID(PK, bigint, auto inc),
CATALOG_NO,
PRODUCT_NAME,
COMPOSITION,
SIZE,
PRICE,
SUBCAT_ID(foreign Key, index, bigint, keyname-FK_products_1)
Table2 name - subcategory
SUBCAT_ID(PKey, bigint, auto inc),
SUBCATEGORY_NAME, CAT_ID(fkey, bigint)
Table3 name - category
CAT_ID(Pkey, bigint, auot inc),
CAT_NAME
1.What is the right query to SELECT and list the data by joining 3 tables which should display result as:
ProductsPID, CATALOG_NO, PRODUCT_NAME, COMPO, SIZE, PRICE, SUBCATEGORY_NAME, CAT_NAME
2.What is the correct way to UPDATE and DELETE the above joined records by using one single query through one single form?
3.Is it possible to insert the records also through single query by using single html form containing fields such as product name (input type=text), catalog no (input type=text), composition (input type=text), size (input type=text), price (input type=text), Choose subcategory (select type field with options), category (select type field with options) if yes then how?
PLEASE HELP, ITS URGENT.