Index: kernel/db/db_connection.php =================================================================== --- kernel/db/db_connection.php (revision 15239) +++ kernel/db/db_connection.php (working copy) @@ -569,6 +569,20 @@ } /** + * Returns iterator for 1st column of a recordset or false in case of error. + * Optional parameter $key_field can be used to set field name to be used + * as resulting array key. + * + * @param string $sql + * @param string $key_field + * @return bool|kMySQLQueryCol + */ + public function GetColIterator($sql, $key_field = null) + { + return $this->GetIterator($sql, $key_field, false, 'kMySQLQueryCol'); + } + + /** * Queries db with $sql query supplied * and returns rows selected if any, false * otherwise. Optional parameter $key_field @@ -1337,7 +1351,7 @@ if ( $this->valid() ) { mysql_data_seek($this->result, $this->position); - $this->rowData = mysql_fetch_array($this->result); + $this->rowData = mysql_fetch_assoc($this->result); } /*if ( !$this->valid() ) { Index: kernel/db/db_load_balancer.php =================================================================== --- kernel/db/db_load_balancer.php (revision 15240) +++ kernel/db/db_load_balancer.php (working copy) @@ -518,6 +518,22 @@ } /** + * Returns iterator for 1st column of a recordset or false in case of error. + * Optional parameter $key_field can be used to set field name to be used + * as resulting array key. + * + * @param string $sql + * @param string $key_field + * @return bool|kMySQLQueryCol + */ + public function GetColIterator($sql, $key_field = null) + { + $conn =& $this->chooseConnection($sql); + + return $conn->GetColIterator($sql, $key_field); + } + + /** * Queries db with $sql query supplied and returns rows selected if any, false * otherwise. Optional parameter $key_field allows to set one of the query fields * value as key in string array.