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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
16ea01c2d727$5e2ab9f0$5da429c4@TECH02">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.
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux