function migrate_example_beer_data_comment in Migrate 6.2
Same name and namespace in other branches
- 7.2 migrate_example/beer.install.inc \migrate_example_beer_data_comment()
1 call to migrate_example_beer_data_comment()
- migrate_example_beer_install in migrate_example/
beer.install.inc
File
- migrate_example/
beer.install.inc, line 434 - Set up for the beer (basic) example.
Code
function migrate_example_beer_data_comment() {
$data = array(
array(
99999998,
NULL,
'im first',
'hot body',
'alice',
'alice@example.com',
0,
),
array(
99999998,
NULL,
'im second',
'hot body',
'alice',
'alice@example.com',
0,
),
array(
99999999,
NULL,
'im parent',
'hot body',
'alice',
'alice@example.com',
0,
),
array(
99999999,
1,
'im child',
'cold body',
'bob',
NULL,
1,
),
array(
99999999,
2,
'im grandchild',
'bitter body',
'charlie@example.com',
NULL,
1,
),
);
foreach ($data as $row) {
db_query("INSERT INTO {migrate_example_beer_comment}\n (bid, cid_parent, subject, body, name, mail, aid)\n VALUES(%d, %d, '%s', '%s', '%s', '%s', %d)", $row);
}
}