Page 1 of 1

delete data from database

Posted: Thu Nov 16, 2006 1:24 am
by Dvorak
Hi,
Let's say i have two tables,

table_one;
userid,userinput,indexno

table_two;
cond,qant,amp,indexno

the indexno in table_one and table_two are the same.if i choose to delete one row of data in table_one,i want the data with the same indexno in table_two be deleted as well.
how can i achieve this?

Posted: Thu Nov 16, 2006 1:25 am
by Luke
DUDE! ONE POST! NOT THREE... be patient... posting more threads on the same topic will not make people answer you faster, in fact it's likely that people will be annoyed and not answer at all.

Posted: Thu Nov 16, 2006 1:44 am
by Dvorak
Oh,that's a mistake man..just ignore it then.. :lol:

Re: delete data from database

Posted: Thu Nov 16, 2006 4:40 am
by aaronhall
Dvorak wrote:the indexno in table_one and table_two are the same.if i choose to delete one row of data in table_one,i want the data with the same indexno in table_two be deleted as well.
how can i achieve this?
Won't two different delete queries delete two different records?