Hi All,
I bhave a database structure, where the actual content of a site can be managed by multiple users. Each user can update multiple pages. So I have set it up by multiple linked tables, e.g.,
Users:
U_id | U_name | ..
Pages
P_id | ...
Pages_to_users
Pu_id | U_nr | P_nr
Where U_nr = U_id and P_nr = P_id
I query these structures through joined tables, e.g.:
"select * from $Pages_table
left join $manager_table on Ma_p_nr = P_id
where (P_owner = $UserToUpdate) or
(Ma_u_nr = $UserToUpdate)"
Now my question is: How can I delete records from one table, while not from an other when I use a join statement?:
If I do:
Delete * from $pages_table
left join $manager_table on Ma_p_nr = P_id
where (P_owner = $UserToUpdate
then it will delete from both tables, right? Or only from the first table?
J.