arunpatal Posted April 9, 2014 Share Posted April 9, 2014 $ip_list_to_check = $viks2007->sql_count("SELECT user_ip,DATE_FORMAT(date_time,'%H:%i:%s') AS date_time FROM $count_table_name"); while($row = mysql_fetch_array($ip_list_to_check)): //save all ipaddress in ip_list_array array $ip_list_array[] = $row["user_ip"]; //save all time in time_list_array array $time_list_array[] = $row["date_time"]; endwhile; This is function in viks2007 class function sql_count($sql){ $query = mysqli_query($this->connect,$sql); return $query; } Am getting error Warning: mysql_fetch_array() expects parameter 1 to be resource, object given in C:\xampp\htdocs\includes\ip_address.php on line 8 Quote Link to comment Share on other sites More sharing options...
Solution mac_gyver Posted April 9, 2014 Solution Share Posted April 9, 2014 if you are using the mysqli_query() function, you MUST use the corresponding mysqli_fetch_xxxxx() functions. you cannot mix mysqli and mysql (no i) functions. Quote Link to comment Share on other sites More sharing options...
arunpatal Posted April 9, 2014 Author Share Posted April 9, 2014 if you are using the mysqli_query() function, you MUST use the corresponding mysqli_fetch_xxxxx() functions. you cannot mix mysqli and mysql (no i) functions. That was it..... thanks a lot Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.