public function get_records_select_menu($table, $select, array $params=null, $sort='', $fields='*', $limitfrom=0, $limitnum=0) {
        $menu = array();
        if ($records = $this->get_records_select($table, $select, $params, $sort, $fields, $limitfrom, $limitnum)) {
            foreach ($records as $record) {
                $record = (array)$record;
                $key   = array_shift($record);
                $value = array_shift($record);
                $menu[$key] = $value;
            }
        }
        return $menu;
    }
public function get_records_select_menu($table, $select, array $params=null, $sort='', $fields='*', $limitfrom=0, $limitnum=0) {
        $menu = array();
        if ($records = $this->get_records_select($table, $select, $params, $sort, $fields, $limitfrom, $limitnum)) {
            foreach ($records as $record) {
                $record = (array)$record;
                $key   = array_shift($record);
                $value = array_shift($record);
                $menu[$key] = $value;
            }
        }
        return $menu;
    }
public function get_records_select_menu ( $ table , $ select , array $ params = null , $ sort = '' , $ fields = '*' , $ limitfrom = 0 , $ limitnum = 0 ) { $ menu = array ( ) ; if ( $ records = $ this -> get_records_select ( $ table , $ select , $ params , $ sort , $ fields , $ limitfrom , $ limitnum ) ) { foreach ( $ records as $ record ) { $ record = ( array ) $ record ; $ key = array_shift ( $ record ) ; $ value = array_shift ( $ record ) ; $ menu [ $ key ] = $ value ; } } return $ menu ; }
Get the first two columns from a number of records as an associative array which match a particular WHERE clause.

Arguments are like {@link function get_recordset_select}.
Return value is like {@link function get_records_menu}.

@param string $table The database table to be checked against.
@param string $select A fragment of SQL to be used in a where clause in the SQL call.
@param array $params array of sql parameters
@param string $sort Sort order (optional) - a valid SQL order parameter
@param string $fields A comma separated list of fields to be returned from the chosen table - the number of fields should be 2!
@param int $limitfrom return a subset of records, starting at this point (optional).
@param int $limitnum return a subset comprising this many records (optional, required if $limitfrom is set).
@return array an associative array
@throws dml_exception A DML specific exception is thrown for any errors.
Get the first two columns from a number of records as an associative array which match a particular WHERE clause .