If else trouble

From: Date: Sun, 24 Feb 2002 22:27:36 +0000
Subject: If else trouble
Groups: php.db 
Request: Send a blank email to php-db+get-17242@lists.php.net to get a copy of this message
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

« previous php.db (#17242) next »