Jump to content

Warning in my function call pls help


evo4ever

Recommended Posts

Hello all. have a look at this code..

function exec_mysql_query($sql, $return_result){global $mysql;$link = mysqli_connect($mysql["hostname"], $mysql["username"], $mysql["password"], $mysql["database"]); if($return_result){  return mysqli_query($link, $sql);}else{  if(mysqli_query($link, $sql)) return true;  else return false;} mysql_close($link);}function stat_logger(){$user_addr = $_SERVER["REMOTE_ADDR"];$origin = $_SERVER["REQUEST_URI"]; $result = exec_mysql_query("SELECT * FROM stats", true);	$match=false;	while($row = mysqli_fetch_array($result)){  if($row["ip"] != $user_addr) continue;  else $match=true; break;}

its giving the following Warning... Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in D:\Hosting\11129137\html\evocms\inc\functions.inc.php on line 51 I got that warning when I uploaded my site, however it works perfectly locally on my PC. Locally im running apache and remotely im running iis Any thoughts? Thanks

Edited by evo4ever
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...