Hi Jackiw
I'm not sure what you mean by 'book rented' - are you running a library?
Anyway, mysql_num_rows() returns a number. If there are no results, you get 0, otherwise you get a positive integer. What you need to do is this:
if (mysql_num_rows($query) == 0)
{
echo "Nothing doing";
}
else
{
$num = mysql_num_rows($query);
echo "There are " . $num . "possibilities.";
}
Having said that, you'll need to supply more details about the type of data in the fields 'pickup' and 'return' - is the data of a type that you can simply do maths equations with them. I suspect you need some MySQL date and time functions, but I'd need more info on your table.
HTH
Norm