why this condition not work

Posted by migo on Stack Overflow See other posts from Stack Overflow or by migo
Published on 2010-06-12T09:40:58Z Indexed on 2010/06/12 9:42 UTC
Read the original article Hit count: 146

Filed under:

*strong text*I noticed that the first condition does not work

if (empty($ss)) { echo "please write your search words"; }

but the second work else if ($num < 1 ) { echo "not found any like ";

full code

if (empty($ss)) { echo "please write your search words"; } else if ($num < 1 ) { echo "not found any like ";

}else { $sql=("SELECT * FROM student WHERE snum = $ss "); $rs = mysql_query($sql) or die(mysql_error());

while($data=mysql_fetch_array($rs)){ ?>

??????? ????? ????? ???? ???? ?????? 100 100 100 100 100 ?????? ???????? ????? ?????? ????? ??????? ?????? ???????

} }; ?>

© Stack Overflow or respective owner

Related posts about php