function DatabaseInsertLOBTestCase::testInsertMultipleBlob
Test that we can insert multiple blob fields in the same query.
File
-
modules/
simpletest/ tests/ database_test.test, line 753
Class
- DatabaseInsertLOBTestCase
- Insert tests using LOB fields, which are weird on some databases.
Code
function testInsertMultipleBlob() {
$id = db_insert('test_two_blobs')->fields(array(
'blob1' => 'This is',
'blob2' => 'a test',
))
->execute();
$r = db_query('SELECT * FROM {test_two_blobs} WHERE id = :id', array(
':id' => $id,
))->fetchAssoc();
$this->assertTrue($r['blob1'] === 'This is' && $r['blob2'] === 'a test', 'Can insert multiple blobs per row.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.