_extra = $rest; $se = $rest["SELECT"]; else: $this->_extra["SELECT"] = $rest; $se = $rest; endif; OOM_Select::OOM_Select($db, $table, $cols, $where, $se, $init); } /* OOM_Select_Rewrite */ function make ($row, $key, $expr) { $ret = FALSE; $this->guarantee(); $db_row = $this->_cache[$row]; if (is_array($db_row) and array_key_exists($key, $db_row)): unset($fields); $fields[$key] = $expr; $qc =& new OOM_Pick_Out_Row($db_row); $uq =& new OOM_Update($this->_db, $this->table(), $fields, array($this->_where, $qc), $this->_extra["UPDATE"]); $uq->issue(); Destroy($uq); $this->issue(); $ret = TRUE; endif; return ($ret); } /* OOM_Select_Rewrite::make () */ function make_where ($condition, $key, $expr) { $ret = FALSE; $this->guarantee(); if (is_array($this->_cache)): unset($fields); $fields[$key] = $expr; $uc = $this->_where; $uc->merge($condition); $uq =& new OOM_Update($this->_db, $this->table(), $fields, $uc, $this->_extra["UPDATE"]); $uq->issue(); Destroy($uq); $this->issue(); $ret = TRUE; endif; return ($ret); } /* OOM_Select_Rewrite::make_where () */ function insert ($what, $cols = NULL, $shove = FALSE) { $this->guarantee(); $iq =& new OOM_Insert($this->_db, $this->table(), $what, $cols, $shove); $iq->issue(); Destroy($iq); $this->issue(); $ret = TRUE; return ($ret); } /* OOM_Select_Rewrite::insert () */ function delete ($row) { $this->guarantee(); unset($ret); if (is_array($this->_cache[$row]) and array_key_exists($row, $this->_cache)): $qc =& new OOM_Pick_Out_Row($this->_cache[$row]); $ret = $this->delete_where($qc, "LIMIT 1"); endif; return $ret; } function delete_row ($row) { $qc =& new OOM_Pick_Out_Row($row); return $this->delete_where($qc); } function clear () { return $this->delete_where(NULL); } function delete_where ($qc, $rest = NULL, $fore = NULL) { unset ($ret); if ($this->guarantee()): $dc = $this->_where; $dc->merge($qc); $dq =& new OOM_Delete($this->_db, $this->table(), $dc, NULL, $rest.' '.$this->_extra["DELETE"], $fore); $ret = $dq->issue(); Destroy($dq); $this->issue(); endif; return ($ret); } /* OOM_Select_Rewrite::delete_where () */ } /* OOM_Select_Rewrite */ ?>