function fb_app_update_6204 in Drupal for Facebook 6.2
Same name and namespace in other branches
- 6.3 fb_app.install \fb_app_update_6204()
File
- ./
fb_app.install, line 146 - Installs database tables and settings required by fb_app module.
Code
function fb_app_update_6204() {
$ret = array();
db_add_field($ret, 'fb_app', 'status', array(
'type' => 'int',
'not null' => TRUE,
'default' => 1,
));
$result = db_query("SELECT n.nid, n.status FROM {node} n WHERE type = 'fb_app'");
while ($data = db_fetch_object($result)) {
$ret[] = update_sql("UPDATE {fb_app} SET status = %d WHERE nid = %d", $data->status, $data->nid);
}
return $ret;
}