summaryrefslogtreecommitdiffstats
path: root/migrate.module
diff options
context:
space:
mode:
authorMike Ryan2009-12-08 17:27:10 +0000
committerMike Ryan2009-12-08 17:27:10 +0000
commitaa72582cfd4ee47ad731a44974b5ee5747005fb1 (patch)
treeeff44d9270124401aa704b4c83599092db077845 /migrate.module
parentddaf2e894f5ca137aa99796cd7f2e43087c3b787 (diff)
Fix up writes to mapping table
Diffstat (limited to 'migrate.module')
-rwxr-xr-xmigrate.module12
1 files changed, 6 insertions, 6 deletions
diff --git a/migrate.module b/migrate.module
index cf205e3..e9b4147 100755
--- a/migrate.module
+++ b/migrate.module
@@ -325,19 +325,19 @@ function migrate_add_mapping($mcsid, $sourceid, $destid) {
$maptables[$mcsid] = migrate_map_table_name($mcsid);
}
$needs_update = db_result(db_query('SELECT needs_update
- FROM {' . $maptables[$mcsid] . '}
- WHERE sourceid=%d',
+ FROM {' . $maptables[$mcsid] . "}
+ WHERE sourceid='%s'",
$sourceid));
if ($needs_update == 1) {
- db_query('UPDATE {' . $maptables[$mcsid] . '}
+ db_query('UPDATE {' . $maptables[$mcsid] . "}
SET needs_update=0
- WHERE sourceid=%d',
+ WHERE sourceid='%s'",
$sourceid);
}
elseif ($needs_update !== 0) {
db_query('INSERT INTO {' . $maptables[$mcsid] . "}
(sourceid, destid, needs_update)
- VALUES('%d', '%d', 0)",
+ VALUES('%s', %d, 0)",
$sourceid, $destid);
}
}
@@ -671,7 +671,7 @@ function migrate_content_process_import($mcsid, &$messages = array(), &$options
db_set_active($viewdb);
}
-// drupal_set_message($query);
+ //drupal_set_message($query);
timer_start('execute view query');
if ($itemlimit) {
$importlist = db_query_range($query, $args, 0, $itemlimit);