• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

PHP/mySQL woes...

coolblu

Member
Hey All!

having a little trouble with a PHP script that is supposed to query a mySQL database. All is fine until the script should return no results - and it just returns a blank screen :confused:

The code can be found at http://www.zapfreebies.com/ja/dos.txt - sorry I didnt post it in the forum it is a bit long ;)

thanks :D

Nick
 
else {
echo "No Results";

}


try replacing the 'else' code with that, looked to me like it was all jumbled with commented out stuff.
 
After looking through this script.. I noticed one thing: (line 52)

if (!$numrows == 0)

(this is the if() to the else{} that you have stating there are no hits.) This is saying if $numrows doesnt exist equal to zero?

try something like this:

if($numrows)

or

if(defined($numrows))

instead of trying to do the reverse of something not existing? :p
 
Last edited:
Thanks for your help everyone but Ive sorted it out now.
If anyone is interested I managed to get round the problems that mysql_num_rows was returning NULL (not zero) by using the intval function (so that it did return zero) with a little help from a friend ;)

Thanks again
 
Back
Top