Hello fellow coders,
Best wishes
Auto Add BOT IP to Table
Moderator: General Moderators
Auto Add BOT IP to Table
Last edited by phphelpme on Sat Feb 25, 2012 2:50 pm, edited 2 times in total.
- social_experiment
- DevNet Master
- Posts: 2793
- Joined: Sun Feb 15, 2009 11:08 am
- Location: .za
Re: Auto Add BOT IP to Table
I think the problem could be where you use count(); From the php manual
This returns a resource which is not what count() accepts; it doesn't give an error but returns 1 instead which is why you are getting 1 each time.
Hth
If var is not an array or an object with implemented Countable interface, 1 will be returned. There is one exception, if var is NULL, 0 will be returned.
Code: Select all
$ipresult = mysql_query($ipquery) or die(mysql_error());Hth
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Re: Auto Add BOT IP to Table
Thanks social_experiment for getting back to me. So basically I just need to set up a variable outside the while loop then increment by 1 inside the loop.
Thanks for your assistance.
Best wishes
Thanks for your assistance.
Best wishes