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