function DatabaseReservedKeywordTestCase::testSelectReservedWordAliasAllFields

File

modules/simpletest/tests/database_test.test, line 4581

Class

DatabaseReservedKeywordTestCase
Test reserved keyword handling (introduced for MySQL 8+)

Code

public function testSelectReservedWordAliasAllFields() {
    $record = db_select('test', 'high_priority')->fields('high_priority')
        ->condition('age', 27)
        ->execute()
        ->fetchAssoc();
    $this->assertEqual($record['name'], 'George', 'Successful all_fields query using an alias which is a reserved word.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.