Hi all,

I have worked and re-worked this if else statement. I can't get it to work.

It's suppose to work like this.

If there are no points in the bank then echo but it always echo's you don't
have enough points. It also wont keep me from withdrawing more than I have
in the bank.

What am I doing wrong and how do I keep the script from letting me withdraw
more than I have, and keep it from echoing "you don't have enough points!"
all the time?

$sql_result = mysql_query("SELECT * FROM bank_points WHERE
uid={$session["uid"]}");
if ($sql_result <= "0") {
         echo "you don't have enough points!";

}else{
   echo "Your withdraw has been made!";
}

Thanks in advance
Jennifer Downey



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to