Thread: PHP Error Help
View Single Post
Old 12-21-2004, 04:53 PM   #12 (permalink)
jg_v7n
v7n Mentor
 
jg_v7n's Avatar
 
Join Date: 08-26-04
Location: Rio de Janeiro
Posts: 1,289
iTrader: 0 / 0%
Latest Blog:
None

jg_v7n is a highly respected web projg_v7n is a highly respected web projg_v7n is a highly respected web projg_v7n is a highly respected web projg_v7n is a highly respected web projg_v7n is a highly respected web projg_v7n is a highly respected web projg_v7n is a highly respected web projg_v7n is a highly respected web projg_v7n is a highly respected web projg_v7n is a highly respected web pro
It looks to me more like this:

Quote:
Originally Posted by Limit
If the IP is in the banlist with the same reason for banning increase attempts by 1.
There is no reference to "the reason" in the select above, so simply if this IP appears in the table it will increase the attempts by one.

Quote:
Originally Posted by Limit
If the IP is not in the database or the same IP has been banned again but for a different reason insert IP again, new reason, ban date and attempts to 1
It will only do an insert if the IP is not already in that table, for the same reason above.

You need to include the "reason" in the select statement, something like:

Code:
$q = "SELECT * FROM ". $table_prefix ."table1 WHERE ban_reason = '".$reason."' AND ban_ip = '". encode_ip($ip) ."'";
jg_v7n is offline   Reply With Quote