All pastes #761638 Raw Edit

Untitled

public text v1 · immutable
·published 2007-11-05 00:53 UTC
rendered paste body
		public function query($sql = null) {
			$this->sql = $sql == null ? $this->sql : $sql;
			$this->result = mysql_query($this->sql, $this->connection) or die(mysql_error());
			$this->get_num_rows();
		}
		public function select($where) {
			$this->where = $where;
			$this->what = $this->what == null ? '*' : $this->what; 
			$sql = $this->oncondition == null ?  "SELECT $this->what FROM $this->where" : "SELECT $this->what FROM $this->where WHERE $this->oncondition";
			$this->query($sql);
		} 
		public function set_on($oncondition) {
			$this->oncondition = $oncondition;
		}