mySQL help please

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • d-null
    . . .
    • Apr 2007
    • 13724

    #1

    mySQL help please

    did this query:

    UPDATE `BLOG_MEMBERS` SET `M_STAT` = '1' WHERE `BLOG_MEMBERS`.`MEMBER_ID` =612 LIMIT 1 ;

    I am curious what the "limit 1" does?

    I am curious how I would modify the syntax of the same query to automatically do all member_id from say 1 to 612?


    thanks

    __________________

    Looking for a custom TUBE SCRIPT that supports massive traffic, load balancing, billing support, and h264 encoding? Hit up Konrad!
    Looking for designs for your websites or custom tubesite design? Hit up Zuzana Designs
    Check out the #1 WordPress SEO Plugin: CyberSEO Suite
  • Bro Media - BANNED FOR LIFE
    MOBILE PORN: IMOBILEPORN
    • Jan 2004
    • 16502

    #2
    limit 1 makes sure that it only updates 1 record

    Comment

    • d-null
      . . .
      • Apr 2007
      • 13724

      #3
      thanks

      do I need to set up some kind of loop query to change all the records in one field?

      (Im a newbie to the sql query thing)

      __________________

      Looking for a custom TUBE SCRIPT that supports massive traffic, load balancing, billing support, and h264 encoding? Hit up Konrad!
      Looking for designs for your websites or custom tubesite design? Hit up Zuzana Designs
      Check out the #1 WordPress SEO Plugin: CyberSEO Suite

      Comment

      • DaveKnell
        Registered User
        • May 2001
        • 76

        #4
        Nope - just make your where clause something like
        where member_id>=1 and member_id<=612

        --Dave

        Comment

        • d-null
          . . .
          • Apr 2007
          • 13724

          #5
          thanks Dave, off to experiment

          __________________

          Looking for a custom TUBE SCRIPT that supports massive traffic, load balancing, billing support, and h264 encoding? Hit up Konrad!
          Looking for designs for your websites or custom tubesite design? Hit up Zuzana Designs
          Check out the #1 WordPress SEO Plugin: CyberSEO Suite

          Comment

          • donborno
            Confirmed User
            • Jan 2007
            • 374

            #6
            Originally posted by DaveKnell
            Nope - just make your where clause something like
            where member_id>=1 and member_id<=612

            --Dave
            Rather use
            Code:
            WHERE member_id BETWEEN 1 AND 612

            Comment

            Working...