]> git.mjollnir.org Git - moodle.git/commitdiff
counting is not sensible is not sorting by id asc
authortoyomoyo <toyomoyo>
Wed, 8 Mar 2006 05:08:44 +0000 (05:08 +0000)
committertoyomoyo <toyomoyo>
Wed, 8 Mar 2006 05:08:44 +0000 (05:08 +0000)
admin/utfdbmigrate.php

index 024b39ebba757287ba9aa3c72aa9fc6ae8859c23..48339e7712b0f672ac80a70bcfea6f270432059a 100755 (executable)
@@ -290,7 +290,7 @@ function db_migrate2utf8(){   //Eloy: Perhaps some type of limit parameter here
                      * converting each record *
                      **************************/
                     while(($counter < $totalrecords) and ($fieldname !='dummy') and ($method!='NO_CONV')) {    //while there is still something
-                        $SQL = 'SELECT * FROM '.$CFG->prefix.$dbtablename.' '.sql_paging_limit($counter, $recordsetsize);
+                        $SQL = 'SELECT * FROM '.$CFG->prefix.$dbtablename.' ORDER BY id ASC '.sql_paging_limit($counter, $recordsetsize);
                         if ($records = get_records_sql($SQL)) {
                             foreach ($records as $record) {
                                 if ($debug) {
@@ -349,7 +349,7 @@ function db_migrate2utf8(){   //Eloy: Perhaps some type of limit parameter here
                                             if ($debug) {
                                                 $db->debug=0;
                                             }
-                                          }
+                                        }
                                           
                                     break;