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 Link to comment https://forums.phpfreaks.com/topic/287630-error-while-fetching/ Share on other sites More sharing options...
mac_gyver Posted April 9, 2014 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. Link to comment https://forums.phpfreaks.com/topic/287630-error-while-fetching/#findComment-1475467 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 Link to comment https://forums.phpfreaks.com/topic/287630-error-while-fetching/#findComment-1475468 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.