PDA

View Full Version : delete or iserting multiple records



ferhanz
03-09-2004, 06:22 AM
well not much experienced with php/mysql..i have just started a project in which i have to maintain a members database ...the members fall in several categories and then those categories have further sub categories.. so i have got 3 tables using the table type MyIsam using version 4 mysql

1. Member
2. Category
3. Sub Category

now when inseting data through forms i have to insert it directly in 3 tables...i know how to insert it single table but how can i insert it in more then 1 in a single statement?

secondly help me out in deleting those records from multiple tables through a single statement

in the last how can implement a full text search in php ?


Thanks in Advance
Farhan Nawazish
webmaster@hrdn.net

bob_99
03-12-2004, 11:47 AM
Hi Farhan,

My impression is that you should take a look at your database design to take advantage of relational tables.

Consider using something like category IDs & member IDs to create join tables to store those relations.

If your database structure is right, then your input form would call multiple input statements to input the related values into the correct tables.

Try a search for 'database normalization' or 'relational database design' in your favorite search engine.

I hope this helps,

Bob


well not much experienced with php/mysql..i have just started a project in which i have to maintain a members database ...the members fall in several categories and then those categories have further sub categories.. so i have got 3 tables using the table type MyIsam using version 4 mysql

1. Member
2. Category
3. Sub Category

now when inseting data through forms i have to insert it directly in 3 tables...i know how to insert it single table but how can i insert it in more then 1 in a single statement?

<SNIP>