MySQL Forums
Forum List  »  PHP

Combining two queries.
Posted by: Duncan Turner
Date: January 30, 2006 04:02AM

I have two queries:

UPDATE tablename SET column=1 WHERE row_id=$id;
UPDATE tablename SET column=0 WHERE row_id<>$id;

But I wish to combine them into one query statement.

Unfortunately I haven't a clue on how to do so.

Could anyone give a helping hand.

Thanks in advance.


Duncan

Options: ReplyQuote


Subject
Written By
Posted
Combining two queries.
January 30, 2006 04:02AM
January 31, 2006 04:40AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.