Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /rideanddrive/_classes/__base.php on line 45
My code :
public static function SelectSpecific($obj, $data_base, $cond)
{
self::$query = "select $obj from " . self::$baseprefix . "$data_base where $cond";
$out = self::Execute();
$array = mysql_fetch_array($out); // THIS LINE IS WARNING LINE
return $array[$obj];
}
Execute function, if needed :
private static function Execute()
{
$out = mysql_query(self::$query);
return $out;
}
Code's works fine. I don't get a warning on localhost (running WAMP, might have turned them off ?), it also works on live server, however I'm getting the above warning, how do I correct it so the warning is gone ?