I have a forum table which I need to perform the following update
1) I have an original message which I need to change its online status into DISABLE 'D' in my "status" field as follow single command:
UPDATE forum SET status = 'D' where message_id = 1 and parent_id is NULL;
*the parent_id field is NULL because it is a parent thread...
However, it has some child threads to this message...therefore I must force the all the child thread to change the status into 'D' also. So I did a second sql query as follow:
UPDATE forum SET status = 'D' where parent_id = 1;
*parent_id = 1 means it points to the parent message_id = 1
My question is
DOES anyone know a good sql query that will combine these two queries into ONE single query?
thanks