public function MostPopularItem::save in Drupal Most Popular 7
Same name and namespace in other branches
- 6 classes/items.php \MostPopularItem::save()
Save the last run info, either updating an existing database record or creating a new one.
File
- classes/
items.php, line 55 - Defines a wrapper for the mostpopular_items table.
Class
- MostPopularItem
- @file Defines a wrapper for the mostpopular_items table.
Code
public function save() {
if ($this->new) {
drupal_write_record(self::$table, $this);
}
else {
drupal_write_record(self::$table, $this, array(
'sid',
'iid',
));
}
}