select_array()的用法:
$value = array( 'username', 'email', 'firstname' );
$result = DB::select_array( $value ) ->from( 'user' ) ->where( 'userid', '=', '1' ) ->execute() ->as_array();
print_r( $result[0] );
答案 0 :(得分:1)
尝试这可能会对你有帮助。
$value = array(
array('username', 'uname'),
array('email', 'mail'),
array('firstname', 'fname')
);
DB::select_array( $value )
->from( 'user' )
->where( 'userid', '=', '1' )
->execute()
->as_array();