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()." 

$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.


Edit Bug report at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to