i’m trying to update a confirmation column in my database with an $i var from a for loop.
[php]
<?php include("../include/connect_db.php"); $nRecords = mysql_num_rows($query) + 100; for ($i = 100; $i <= $nRecords; $i++) { mysql_query("UPDATE debtor_payments SET `confirmation`= '$i' WHERE `confirmation`=0") or die(mysql_error()); } ?>[/php]
I don’t want to do it manually since we talking about 500+ records.
the loop runs and set all records confirmation to 100 which it should be 100,101,102,103 and so on.