function flag_views_bookmark_update_3 in Flag 5
Same name and namespace in other branches
- 6.2 includes/flag.views_bookmark.inc \flag_views_bookmark_update_3()
- 6 includes/flag.views_bookmark.inc \flag_views_bookmark_update_3()
File
- includes/
flag.views_bookmark.inc, line 293 - flag.view_bookmark.inc
Code
function flag_views_bookmark_update_3() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
$result = db_query('SELECT vbid, nid, count(uid) as count FROM {views_bookmark_nodes} GROUP BY vbid, nid');
while ($row = db_fetch_object($result)) {
$ret[] = update_sql("INSERT INTO {views_bookmark_node_count} VALUES ({$row->vbid}, {$row->nid}, {$row->count})");
}
break;
}
return $ret;
}