Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 12-04-2007, 02:06 AM   #1
d-null
. . .
 
d-null's Avatar
 
Industry Role:
Join Date: Apr 2007
Location: NY
Posts: 13,724
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
d-null is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-04-2007, 02:19 AM   #2
Bro Media - BANNED FOR LIFE
MOBILE PORN: IMOBILEPORN
 
Join Date: Jan 2004
Location: Tinseltown NL
Posts: 16,502
limit 1 makes sure that it only updates 1 record
Bro Media - BANNED FOR LIFE is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-04-2007, 03:37 AM   #3
d-null
. . .
 
d-null's Avatar
 
Industry Role:
Join Date: Apr 2007
Location: NY
Posts: 13,724
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)
d-null is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-04-2007, 03:56 AM   #4
DaveKnell
Registered User
 
Join Date: May 2001
Location: London, England
Posts: 76
Nope - just make your where clause something like
where member_id>=1 and member_id<=612

--Dave
DaveKnell is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-04-2007, 03:57 AM   #5
d-null
. . .
 
d-null's Avatar
 
Industry Role:
Join Date: Apr 2007
Location: NY
Posts: 13,724
thanks Dave, off to experiment
d-null is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-04-2007, 04:18 AM   #6
donborno
Confirmed User
 
Join Date: Jan 2007
Location: Vienna, Austria
Posts: 374
Quote:
Originally Posted by DaveKnell View Post
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
donborno is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.