Re: sql query
| From: | M. Sokolewicz | Date: | Wed, 02 Mar 2005 12:06:38 +0000 |
| Subject: | Re: sql query | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-209787@lists.php.net to get a copy of this message | ||
! is a logical NOT operator. It simply turns true => false, and false => true.
So, what you have is:
$a = true;
if($a) {
echo 'true';
} else {
echo 'false';
}
if(!$a) {
echo 'false!';
} else {
echo 'true!';
}
In these 2 cases, it will echo
true and true!
More info can be found here:
http://www.php.net/manual/en/language.operators.logical.php
William Stokes wrote:
Hello Can someone explain this to me. I don't know how to read this. if (!$variable = mysql_query("select id,sessid from users where ... What is this "if(!" I mean the ! sign. Thanks -Will