[dev] sql change to order users by name

Ilya mail@krel.org
Thu, 5 Sep 2002 02:01:55 -0400


--- sql.php.org Thu Sep  5 01:57:08 2002
+++ sql.php     Thu Sep  5 01:52:42 2002
@@ -239,9 +239,10 @@
         $this->_connect();

         /* Build the SQL query. */
-        $query = sprintf('SELECT %s FROM %s',
+        $query = sprintf('SELECT %s FROM %s ORDER BY %s',
                          $this->_params['username_field'],
-                         $this->_params['table']);
+                         $this->_params['table'],
+                         $this->_params['username_field']);

         $result = $this->_db->getAll($query, null, DB_FETCHMODE_ORDERED);
         if (PEAR::isError($result)) {