Jump to content


Photo

SQL query: a little help, please!


  • Please log in to reply
2 replies to this topic

#1 sbourdon

sbourdon
  • Members
  • PipPipPip
  • Advanced Member
  • 35 posts

Posted 23 May 2006 - 02:25 PM

Hello,

I would like to create a php script that would execute a SQL query that would do the following:

Inside the topics_watch table, set the notify_status value to 0 for all users EXCEPT user_id 2.


What should the SQL query be?

Thanks for your help! [img src=\"style_emoticons/[#EMO_DIR#]/wink.gif\" style=\"vertical-align:middle\" emoid=\":wink:\" border=\"0\" alt=\"wink.gif\" /]

#2 micah1701

micah1701
  • Members
  • PipPipPip
  • Advanced Member
  • 613 posts
  • LocationEllington, CT USA

Posted 23 May 2006 - 02:30 PM

UPDATE topics_watch SET notify_staus = 0 WHERE user_id NOT LIKE 2
"Confidence in the face of risk."

#3 sbourdon

sbourdon
  • Members
  • PipPipPip
  • Advanced Member
  • 35 posts

Posted 23 May 2006 - 04:52 PM

[!--quoteo(post=376352:date=May 23 2006, 09:30 AM:name=micah1701)--][div class=\'quotetop\']QUOTE(micah1701 @ May 23 2006, 09:30 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
UPDATE topics_watch SET notify_staus = 0 WHERE user_id NOT LIKE 2
[/quote]

Perfect; thanks a lot!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users