public function DatabaseReservedKeywordTestCase::testSelectReservedWordTableAllFields in Drupal 7
File
- modules/
simpletest/ tests/ database_test.test, line 4318
Class
- DatabaseReservedKeywordTestCase
- Test reserved keyword handling (introduced for MySQL 8+)
Code
public function testSelectReservedWordTableAllFields() {
$record = db_select('virtual')
->fields('virtual')
->execute()
->fetchAssoc();
$this
->assertEqual($record['function'], 'Function value 1', 'Successful all_fields query from a table with a name and column which are reserved words.');
}