Exemple #1
0
 /**
  * Extend the default ORM save to also update matching Category_Lang record if it exits
  */
 public function save()
 {
     parent::save();
     $table_prefix = Kohana::config('database.default.table_prefix');
     $this->db->query('UPDATE `' . $table_prefix . 'category_lang` SET category_title = ?, category_description = ? WHERE category_id = ? AND locale = ?', $this->category_title, $this->category_description, $this->id, $this->locale);
 }