cascade delete question

2011-06-17 Thread Derek Knapp
I have the following 3 tables.. If I have a contact with just notes (no tasks), then I can simply do delete from contacts where id = ; but if the contact has a task, then I get the following error, ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (`

Cascade on delete question.

2004-09-08 Thread sean c peters
I have two tables, call them Parent and Child, where the records in Child have a foreign key relation to Parent, with a Cascade on Delete. If i delete records from Parent, the corresponding records in Child will be deleted. Is there any way that i can get a count of the records in Child that wer

RE: sql delete question

2003-01-10 Thread Veysel Harun Sahin
Hello Adolfo, Yes I have tried it too but it did not work. Anyway i have done it programatically in my app. Thanks. "Adolfo Bello" <[EMAIL PROTECTED]> wrote: >> I have two tables whose structures are below. >> >> - Table1 - >> table1id int not null auto_increment >> data varchar(30) >> >> - Ta

RE: sql delete question

2003-01-08 Thread Adolfo Bello
> I have two tables whose structures are below. > > - Table1 - > table1id int not null auto_increment > data varchar(30) > > - Table2 - > table2id int not null auto_increment > table1id int not null > data varchar(30) > > > These two tables are connected to each other with the > "table1id" co

Re: sql delete question - solved

2003-01-08 Thread Veysel Harun Sahin
Hello Paul, I have tried the code you have written, before posting to list and it did not work. When I have seen the sentence "This requires that you have MySQL 4.x" at your mail I realized the problem. I am using mySQL 3.23.49. :( Thanks for your help. Paul DuBois <[EMAIL PROTECTED]> wrote:

Re: sql delete question

2003-01-08 Thread Paul DuBois
At 7:27 -0500 1/8/03, Veysel Harun Sahin wrote: Hello, I have two tables whose structures are below. - Table1 - table1id int not null auto_increment data varchar(30) - Table2 - table2id int not null auto_increment table1id int not null data varchar(30) These two tables are connected to each o

sql delete question

2003-01-08 Thread Veysel Harun Sahin
Hello, I have two tables whose structures are below. - Table1 - table1id int not null auto_increment data varchar(30) - Table2 - table2id int not null auto_increment table1id int not null data varchar(30) These two tables are connected to each other with the "table1id" column. I need to dele

Re: simple (I thought) delete question

2002-12-31 Thread Frank Peavy
: "Greg Matthews" <[EMAIL PROTECTED]> To: "Richard Forgo" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, January 01, 2003 9:29 AM Subject: Re: simple (I thought) delete question > if you want to do it in one statement, you'll need to wait f

Re: simple (I thought) delete question

2002-12-31 Thread Greg Matthews
'Air Force') - Original Message - From: "Greg Matthews" <[EMAIL PROTECTED]> To: "Richard Forgo" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, January 01, 2003 9:29 AM Subject: Re: simple (I thought) delete question > i

Re: simple (I thought) delete question

2002-12-31 Thread Greg Matthews
chard Forgo" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 01, 2003 8:12 AM Subject: simple (I thought) delete question > Hi folks, > > I hope that dumb questions are allowed in here ... > > I have two MySQL tables and I would like to delete records fr

Re: simple (I thought) delete question

2002-12-31 Thread Brian
Richard, Tuesday, December 31, 2002, 4:12:15 PM, you wrote: > Hi folks, > I hope that dumb questions are allowed in here ... > I have two MySQL tables and I would like to delete records from one > based on associated values in another. For example, using the example > tables below, how would I

simple (I thought) delete question

2002-12-31 Thread Richard Forgo
Hi folks, I hope that dumb questions are allowed in here ... I have two MySQL tables and I would like to delete records from one based on associated values in another. For example, using the example tables below, how would I delete all the records in the TIDS table that had an associative value

Re: DELETE question

2001-05-02 Thread Paul DuBois
At 1:43 PM -0500 5/2/01, Dawn H wrote: >Anybody got a clue why this isn't deleting? The number is input in the >previous section of code and I know it works correctly, but for some reason How do you know? >when it gets to here, it just skips to view (apparently), (even if I # out >the Lock lines

DELETE question

2001-05-02 Thread Dawn H
Anybody got a clue why this isn't deleting? The number is input in the previous section of code and I know it works correctly, but for some reason when it gets to here, it just skips to view (apparently), (even if I # out the Lock lines, so it isn't a lock problem). Am I going about getting the nu