function DatabaseTransactionTestCase::executeDDLStatement

Execute a DDL statement.

1 call to DatabaseTransactionTestCase::executeDDLStatement()
DatabaseTransactionTestCase::testTransactionWithDdlStatement in modules/simpletest/tests/database_test.test
Test the compatibility of transactions with DDL statements.

File

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

Class

DatabaseTransactionTestCase
Test transaction support, particularly nesting.

Code

protected function executeDDLStatement() {
    static $count = 0;
    $table = array(
        'fields' => array(
            'id' => array(
                'type' => 'serial',
                'unsigned' => TRUE,
                'not null' => TRUE,
            ),
        ),
        'primary key' => array(
            'id',
        ),
    );
    db_create_table('database_test_' . ++$count, $table);
}

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