protected $table;
protected $data;
protected $id;
+ protected $rootPath;
public function __construct($table, $id=false, $column_or_db=false, $column=false)
{
if ($id && !$col) $this->load($id);
if ($id && $col) $this->loadByColumn($id,$col);
+
+ $path = substr($_SERVER['HTTP_REFERER'], strpos($_SERVER['HTTP_REFERER'], $_SERVER['SERVER_NAME'])+strlen($_SERVER['SERVER_NAME'])+1);
+
+ $pos = 0;
+ $this->rootPath = '';
+ while (($pos = strpos($path, '/', $pos)) !== false) {
+ $this->rootPath .= '../';
+ $pos++;
+ }
}
protected function postLoad() {}
$this->db->delete($this->table, $this->idcolumn, $id === false ? $this->id : $id);
}
+ public function quote($string) { return $this->db->quote($string); }
+ public function execute($sql) { return $this->db->execute($sql); }
+ public function fetchValue($sql) { return $this->db->fetchValue($sql); }
+ public function fetchAssoc($sql) { return $this->db->fetchAssoc($sql); }
+ public function fetchAssocList($sql) { return $this->db->fetchAssocList($sql); }
+ public function fetchObject($sql) { return $this->db->fetchObject($sql); }
+ public function fetchObjectList($sql) { return $this->db->fetchObjectList($sql); }
}
-
-?>
\ No newline at end of file