Hey Guys
Can anyone help me. On my website i receive this message
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /usr/local/psa/home/vhosts/mangofitness.net/httpdocs/developments/includes/mysql.inc.php on line 26
The coding for this file is below, can anyone help me get no errors.
<?
require_once("config.php");
function db_connect()
{
mysql_connect(DATABASE_SERVER,DATABASE_USER,DATABASE_PASSWORD)
or die("Connection error: ".mysql_error());
mysql_select_db(DATABASE_NAME)
or die("Database not found: ".mysql_error());
return 0;
}
function db_close()
{
mysql_close();
}
function db_query($query)
{
$result = mysql_query($query);
return $result;
}
function db_getrows($resource)
{
$data = array();
$sql="select * from escrow_user where user='$user' and pass='$pass' LIMIT 1";
{
while ($row = mysql_fetch_assoc($resource))
$data[] = $row;
return $data;
}
return array();
}
?>
Thanks, would be much appreciated.
Jack