You are here

function migrate_example_wine_data_wine in Migrate 6.2

Same name and namespace in other branches
  1. 7.2 migrate_example/wine.install.inc \migrate_example_wine_data_wine()
1 call to migrate_example_wine_data_wine()
migrate_example_wine_install in migrate_example/wine.install.inc

File

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

Code

function migrate_example_wine_data_wine() {
  $data = array(
    array(
      1,
      'Montes Classic Cabernet Sauvignon',
      'Intense ruby-red color',
      'Great!',
      9,
      strtotime('2010-01-02 03:04:05'),
      strtotime('2010-03-04 05:06:07'),
      25,
      17,
      95,
      '3/4/10 05:06:07 PM',
    ),
    array(
      2,
      'Archeo Ruggero di Tasso Nero d\'Avola',
      'Lots of berry character',
      'Pair with red sauced dishes',
      3,
      strtotime('2010-09-03 18:23:58'),
      strtotime('2010-09-03 18:23:58'),
      26,
      2,
      85,
    ),
  );
  foreach ($data as $row) {
    db_query("INSERT INTO {migrate_example_wine}\n              (wineid, name, body, excerpt, accountid, posted, last_changed,\n                variety, region, rating, last_reviewed)\n              VALUES(%d, '%s', '%s', '%s', %d,\n                     '%s', '%s', %d, %d, %d, '%s')", $row);
  }
}