Michael Posted January 25, 2006 Share Posted January 25, 2006 HelloWhat I am trying to solve is as follows:I have a table that contains three fields that record preferences of user car models selected from a fixed list of car makes. Although the list is finite, any field can contain any member of the car make list.I want the ability to delete a car from the list. When I do that I want to go thru the table and replace the deleted car model with "empty"I know I can do with with three queries, but am trying to figure out if I can do it with one query. I've been researching on the 'net but am not coming up with an answer.What I would like to do is something likeUPDATE TABLE SET (field 1 = "empty" WHERE field 1 = 'toyata"), (field 2 = "empty" WHERE field 2 = 'toyata"), (field 3 = "empty" WHERE field 2 = 'toyata") WHERE userid = "id";I suppose my example is absurd but it gives the idea of what I want to do if possible.Or just use three queries.I would appreicate any comments.Thanks Quote Link to comment Share on other sites More sharing options...
fenway Posted January 25, 2006 Share Posted January 25, 2006 See my response [a href=\"http://www.mysqlfreaks.com/forums/index.php?showtopic=8984&st=0&\" target=\"_blank\"]on this MySQLFreaks.com cross-post thread[/a]. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.