Commit d4570f03 authored by webchick's avatar webchick
Browse files

#817216 follow-up by Stevel: Fixed database prefixes in poll_update_7001().

parent 435e4e03
......@@ -148,7 +148,7 @@ function poll_update_7001() {
db_add_field('poll_votes', 'chid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0));
db_add_index('poll_votes', 'chid', array('chid'));
->expression('chid', DatabaseConnection::prefixTables('COALESCE((SELECT chid FROM {poll_choices} c WHERE {poll_votes}.chorder = c.chorder AND {poll_votes}.nid = c.nid), 0)'))
->expression('chid', Database::getConnection()->prefixTables('COALESCE((SELECT chid FROM {poll_choices} c WHERE {poll_votes}.chorder = c.chorder AND {poll_votes}.nid = c.nid), 0)'))
// Delete invalid votes.
db_delete('poll_votes')->condition('chid', 0)->execute();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment