?

Search Help Board

PHP FAQ
PHP Articles
PHP Help
Bulletin Board

PHP Manual (NEW!)
First Time PHP'ers
Help with programming
Sql assignment help
PHP Homework Help


C# Help

?
?search query..
Author:??(---.30.20.178.Dial1.Dallas1.Level3.net)
Date:???02-19-04 07:14


$bs = "SELECT bannedip from bannedips where bannedip LIKE '%$userip%'";
$result = mysql_query($bs) OR die(mysql_error());


I know i get the $userip correctly, and i know my ip matches it, but when i search mysql using that string it doesnt return anything :(

anybody got a beter idea??

?Re: search query..
Author:??(---.30.20.178.Dial1.Dallas1.Level3.net)
Date:???02-19-04 08:03

mike... wrote:
>
>
> $bs = "SELECT bannedip from bannedips where bannedip LIKE
> '%$userip%'";
> $result = mysql_query($bs) OR die(mysql_error());
>
>
> I know i get the $userip correctly, and i know my ip matches
> it, but when i search mysql using that string it doesnt
> return anything :(
>
> anybody got a beter idea??





i also tried...

$bs = "SELECT bannedip from bannedips where bannedip LIKE '%$userip'";

$result = mysql_query($bs) OR die(mysql_error());

?Re: search query..
Author:??(---.scpe.powergate.ca)
Date:???02-19-04 09:05

IP is text or numeric? have you tried to run your query thru phpmyadmin or something like it? What are the results from that?>

?Re: search query..
Author:??(---.30.37.51.Dial1.Dallas1.Level3.net)
Date:???02-19-04 16:47


it looks like a normal ip
67.20.30.175

i try to take off the last set of digits..like so


67.20.30 when its inserted into the db it looks like that

then i take a full ip 67.20.30.175 and try searching for it...


it just doesnt find any matches..returns 0 rows

?Re: search query..
Author:??(---.cpe.net.cable.roger)
Date:???02-19-04 17:33

Well it won't. you are giving it more values than what you have...its got to have the same or less to match with LIKE

You might wanna try regex matching
http://www.mysql.com/doc/en/Regexp.html

Go to Top??|??Go to Topic??|??Threaded View??|??Search?
??|??
New Topic
?Reply To This Message
?Your Name:
?Your Email:
?Subject:
Email replies to this thread, to the address above.
??

Provided By
Phorum