this line of query run in php get the right result which is 4 but I use it in php will only get 1..how come?
function totalrental(){
$result = mysql_query("SELECT SUM(Rent_time) FROM product") or die (mysql_error());
$count = mysql_num_rows($result);
if ($count >= 1){
echo $count;
}else{
echo "0";
}
}