예제 #1
0
파일: properties.php 프로젝트: pihizi/qf
 function save()
 {
     if ($this->_updated) {
         $name = $this->_object->name();
         //修正表结构
         $db = ORM_Model::db($name);
         $id = $this->_object->id;
         $db->query('INSERT INTO `%1$s` (`id`, `_extra`) VALUES (%2$d, "%3$s") ON DUPLICATE KEY UPDATE `_extra`="%3$s"', $name, $id, @json_encode($this->_items, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES));
         $this->_updated = FALSE;
     }
     return $this;
 }