Курсовая работа: Автоматизація процесу обліку
function db($host="localhost",$user="lus",$pass="1")
{
$this->dbl = mysql_pconnect($host,$user,$pass);
mysql_select_db("lus", $this->dbl);
}
function query($q)
{
$this->res = mysql_query($q, $this->dbl);
return $this->res;
}
function num_rows()
{
return mysql_num_rows($this->res);
}
function fetch_row()
{
return mysql_fetch_row($this->res);
}
function fetch_array()
{
return mysql_fetch_array($this->res,MYSQL_ASSOC);
}
function fetch_object()
{
return mysql_fetch_object($this->res);
}
function insert_id()
{
return mysql_insert_id($this->dbl);