sonny Posted July 25, 2009 Share Posted July 25, 2009 Hi Does anyone know how I can get and set an individual ip address count total into the array below? $query=" SELECT * FROM visits WHERE page='$page' && vcode='1' ORDER BY id DESC LIMIT 10"; $result=mysql_query($query) or die(mysql_error()); while($row =mysql_fetch_array($result)) { $lip=$row['ip']; $id=$row['id']; $page=$row['page']; $country=$row['country']; $region=$row['region']; $city=$row['city']; $time=$row['time']; $url=$row['url']; $refer=$row['refer']; So when I go and display those values above later I can also include the total entry rows for that individual IP Sonny Quote Link to comment https://forums.phpfreaks.com/topic/167411-counting-the-total-entrys-by-ip-address-and-setting-into-array/ Share on other sites More sharing options...
abazoskib Posted July 26, 2009 Share Posted July 26, 2009 you can do something like this: SELECT COUNT(*) WHERE ip=$lip this will return the number of rows with the ip address $lip Quote Link to comment https://forums.phpfreaks.com/topic/167411-counting-the-total-entrys-by-ip-address-and-setting-into-array/#findComment-883502 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.