Ejemplo n.º 1
0
 public function save()
 {
     //TODO: implement unique name.
     //saving
     EDatabase::q("INSERT INTO ocs_content (name,type,owner,personid,downloadname1,downloadlink1,description,summary,version,changelog,preview1,preview2,preview3,license) VALUES ('" . $this->name . "'," . $this->type . "," . $this->owner . ",'" . $this->personid . "','" . $this->downloadname1 . "','" . $this->downloadlink1 . "','" . $this->description . "','" . $this->summary . "','" . $this->version . "','" . $this->changelog . "','" . $this->preview1 . "','" . $this->preview2 . "','" . $this->preview3 . "'," . $this->license . ")");
     //updating new id, got from database
     $this->id = $id = EDatabase::last_insert_id();
 }
Ejemplo n.º 2
0
 public function save_to_db()
 {
     //TODO: implement unique name.
     //saving
     EDatabase::q("INSERT INTO ocs_comment (type,owner,content,content2,parent,votes,score,subject,message) VALUES ('" . $this->type . "'," . $this->owner . "," . $this->content . ",'" . $this->content2 . "','" . $this->parent . "','" . $this->votes . "','" . $this->score . "','" . $this->subject . "','" . $this->message . "')");
     $this->id = $id = EDatabase::last_insert_id();
     return $id;
 }