PHP-MySQL 3 tables select, update, delete and insert linked with Foreign Key?

SELECT p. PID AS ProductsPID, p. CATALOG_NO, p.

PRODUCT_NAME, p. COMPOSITION AS COMPO, p. SIZE, p.

PRICE, s. SUBCATEGORY_NAME, c. CAT_NAME FROM products p INNER JOIN subcategory s ON p.

SUBCAT_ID = s. SUBCAT_ID INNER JOIN category c ON s. CAT_ID = c.

CAT_ID update and delete can also use join in some cases (not on foreignkeys) but you probably only need to change the product table. Insert has to be on the individual tables.

Same how can I add a product in the product table by using a form, form which will have user input fields- product name, catalog no, compo, size, price, subcategory(pre-populated drop down list to select an option) and category(pre-populated drop down list to select an option) – Henry Mar 30 at 6:02 With your current tables the category is implicit given by the selected subcategory. But as it looks this design is not what you want. You'll probably have to move the CAT_ID column from table subcategory to table products.

– bw_üezi Mar 30 at 6:50 can I do this through php or do I have to do this manually by using phpmyadmin panel, how is it possible to move that column without loosing or disturbing the data. – Henry Mar 30 at 7:22 It's just an idea to change the table structure... You should consider pros and cons before doing it. Moving column can be done by 1.

Create new column, 2. Copy data using e.g. Insert statement with subquery, 3. After verification remove old column.

– bw_üezi Mar 30 at 8:04.

I need do atomic actions: create-moving files, insert-update database. Are there any good practices for file system transactions using WinXP?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions