Mysql Query: UPDATE Database SET This=this+2 WHERE This Greater Than Value;



Mysql Query: UPDATE Database SET This=this+2 WHERE This Greater Than Value;
 (382) Find work at Home Jobs
Mysql Query: UPDATE Database SET This=this+2 WHERE This Greater Than Value;
Post Description:
Post Tags: mysql, query, update, database, set, thisthis2, where, this, greater, than, value
This Post Has Been Viewed 354 Times Since Mon Feb 18, 2008 1:33 pm Posted By hostman with 0 replies
Mysql Query: UPDATE Database SET This=this+2 WHERE This Greater Than Value;
this is just an example of how you can do many things in a single mysql query:

lets say i have a mysql table where one of my colums is rank and i want to change the ranking to two levels up in each row but i only want it where the row have a money greater than 500, i would follow this:

UPDATE database SET this=this+2 WHERE this greater than value

so mysql query would look like this:

PHP CODE:

$money_limit = "500";
$sql = "UPDATE table SET `rank`=`rank`+2 WHERE `left` > ".$money_limit;


this short tutorial brought to you by www.webune.com
PHP/MYSQL WEB HOSTING


Leave Your Comments     [ dejar commentarios ]
  * Name     [nombre]

  * eMail (will not be published)     [coreo electronico]

* Enter Your Reply or Comments:    [commentarios]


Add Picture To Comments         [incluir foto]
YES NO             upload
Receive Replies on my Comments (An email will be sent to you when someone replies to your comments)

     

Comments and replies About Mysql Query: UPDATE Database SET This=this+2 WHERE This Greater Than Value;




(0) Comments