function DatabaseReservedKeywordTestCase::testSelectReservedWordTableSpecificField

File

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

Class

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

Code

public function testSelectReservedWordTableSpecificField() {
    $record = db_select('virtual')->fields('virtual', array(
        'function',
    ))
        ->execute()
        ->fetchAssoc();
    $this->assertEqual($record['function'], 'Function value 1', 'Successfully read a field from a table with a name and column which are reserved words.');
}

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