You are here

function migrate_example_wine_data_blobs in Migrate 7.2

1 call to migrate_example_wine_data_blobs()
migrate_example_wine_install in migrate_example/wine.install.inc

File

migrate_example/wine.install.inc, line 1395
Set up for the wine (advanced) example.

Code

function migrate_example_wine_data_blobs() {
  $blob = file_get_contents('misc/druplicon.png');
  $fields = array(
    'imageid',
    'imageblob',
  );
  $query = db_insert('migrate_example_wine_blobs')
    ->fields($fields);
  $data = array(
    array(
      1,
      $blob,
    ),
  );
  foreach ($data as $row) {
    $query
      ->values(array_combine($fields, $row));
  }
  $query
    ->execute();
}