/** * delete one or more entities from the model. * * @param string $table the table name * @param mixed[] $conditions the limitations of entities */ public function delete($table, $key, $inputs) { $inputs[] = $table; $inputs[] = $key; $inputs[] = prepareSqlQuestionMarks(count($inputs)); $sql = vsprintf("delete from %s where %s in (%s)", $inputs); }
public function selectById($id) { $sql = vsprintf("select * from %s where %s in (%s)", array($this->view, $this->primaryKey, prepareSqlQuestionMarks($id))); return $this->execute($sql, is_array($id) ? $id : array($id)); }