Re: More help with mysql -- solved (bizarre)

From: Date: Thu, 27 Feb 2003 11:56:57 +0000
Subject: Re: More help with mysql -- solved (bizarre)
References: 1 2 3 4 5 6  Groups: php.db 
Request: Send a blank email to php-db+get-25952@lists.php.net to get a copy of this message
It's not bizarre behaviour > $result = mysql_query("SELECT * FROM SOME_TABLE") || die ("Unable to execute > SQL query"); returns result of logical OR operation which is TRUE or 1 without || die(...) it returns valid MySQL resource Regards Sasha "Evan Morris" <evan@exclusivebooks.com> wrote in message news:16ea01c2d727$5e2ab9f0$5da429c4@TECH02... > If I remove the '|| die' part from the mysql_query() statement, it works > fine. This is bizarre, but there it is. > > ie, if I have: > > $result = mysql_query("SELECT * FROM SOME_TABLE"); > > it works. > > If I have: > > $result = mysql_query("SELECT * FROM SOME_TABLE") || die ("Unable to execute > SQL query"); > > it doesn't work. It gives me: " Supplied argument is not a valid MySQL > result resource" > > Anyway, since it works I don't suppose I should complain, but it seems > pretty weird to me nevertheless. >

« previous php.db (#25952) next »