function database($host,$username,$password,$dbname) { $this->conn = mysql_connect($host, $username, $password) or die("Could not connect : " . mysql_error()); mysql_select_db($dbname,$this->conn) or die("Could not select database"); }
function close() { mysql_close($this->conn);}
function execute($query) { $res=new resultset(); return $res->exec($query,$this->conn); }
function getid() { return mysql_insert_id(); }
function SelectLimit($query,$nb,$start) { $res=new resultset(); return $res->exec($query." LIMIT $start,$nb",$this->conn); }
function updateclob($table,$field,$data,$where) { $query="UPDATE $table SET $field=".$this->qstr($data)." WHERE $where"; return mysql_query($query,$this->conn); }