hey people
please tell me what to do , when ever i use mysql_fetch_array(data) i get this error :
Warning: mysql_fetch_array() expects parameter 1 to be resource, null given in C:\xampp\htdocs\awah.biz2\classes\class_lib.php on line 34
please tell me what to do , here is the class_lib.php:
<?php
class db
{
var $do;
function __construct()
{
}
function connect()
{
mysql_connect("localhost","root","")or die("cant connect to MySQL server : ".mysql_error());
}
function select()
{
mysql_select_db("awah7870_index") or die("cant select the db : ".$select);
}
function query($data)
{
$q = mysql_query($data);
if($q)
{
echo "";
}
else
{
echo "Error : ".mysql_error();
}
}
function close()
{
mysql_close();
}
function fetch($data)
{
mysql_fetch_array($data);
}
}
?>