RE: [PHP-DB] delete statement question

From: Date: Mon, 25 Mar 2002 20:02:36 +0000
Subject: RE: [PHP-DB] delete statement question
Groups: php.db 
Request: Send a blank email to php-db+get-17897@lists.php.net to get a copy of this message
if you are using mysql 4.x, you might try: DELETE answers FROM exam e, questions q, answers a WHERE a.question_id=q.question_id && q.exam_id=e.exam_id; I've not tested this, though. -----Original Message----- From: Andrés Felipe Hernández [mailto:andres@alleati.com] Sent: Monday, March 25, 2002 4:42 PM To: php-db@lists.php.net Subject: [PHP-DB] delete statement question Hi, I hope you can help me with this: I have these 3 tables. exam ( exam_id ) questions ( question_id exam_id ) answers ( answer_id question_id ) I am wondering if i can delete all the rows for answers linked to a given exam using only one delete statement. Thanks in advance, andres -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.db (#17897) next »