From: [EMAIL PROTECTED]
Operating system: red hat 6.2
PHP version: 4.0.4pl1
PHP Bug Type: *General Issues
Bug description: || operator gives unexpected results
<?
$db = mysql_connect("localhost", "web") || print "error connecting ".mysql_error()."
".mysql_errno();
mysql_select_db("surveys");
$result = mysql_query("select * from attract") || print "error querying
".mysql_error()." ".mysql_errno();
$i = 0;
while ($row = mysql_fetch_array($result)){ // && ($i++ < 5)){
echo $row[0]." ".$row[1]."<br>";
}
?>
this script will repeatedly give me invalid MySQL Link Resource Warnings, but by
changing the "||" to "or" it will work fine.
Thanks
--
Edit Bug report at: http://bugs.php.net/?id=9482&edit=1
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]