Skip to content

Commit

Permalink
Fix db update
Browse files Browse the repository at this point in the history
  • Loading branch information
benscott committed Oct 22, 2018
1 parent 99c038d commit 9027769
Showing 1 changed file with 7 additions and 5 deletions.
Expand Up @@ -136,11 +136,13 @@ function scratchpads_messages_update_7003() {
$query->isNull('m.mid');
$result = $query->execute()->fetchAll();

$mids = array();
foreach($result as $row) {
$mids[] = $row->mid;
if(count($result)){
$mids = array();
foreach($result as $row) {
$mids[] = $row->mid;
}
db_delete($table_name)->condition('mid', $mids)->execute();
}

db_delete($table_name)->condition('mid', $mids)->execute();
}
}

0 comments on commit 9027769

Please sign in to comment.