Re: from mysql in associative array [message #183975 is a reply to message #183974] |
Sat, 30 November 2013 00:30 |
Ben Bacarisse
Messages: 82 Registered: November 2013
Karma:
|
Member |
|
|
Denis McMahon <denismfmcmahon(at)gmail(dot)com> writes:
> On Fri, 29 Nov 2013 22:26:30 +0000, Ben Bacarisse wrote:
>
>> Thomas 'PointedEars' Lahn <PointedEars(at)web(dot)de> writes:
>>
>>> Tony Mountifield wrote:
>>>> I wrote:
>
>>>> > if ($sh) {
>>>
>>> Insufficient, RTFM.
>>
>> Can you say why?
>
> I'd guess tpel is postulating a resource with a non truthy value being
> returned from mysql_query, although I also note that reading the manual
> entry for mysql_query the section on return value does *_NOT_* contain
> the standard warning about valid false return values.
>
> 'if ($sh) {}' appears to be fine according to the manual, which also
> states that a resource is always truthy[1],
Sure -- mysql_query is documented to return FALSE or a resource -- so it
looks fine to me, as least as far as recent PHP versions go.
I suppose I'd have to ask in a more literal way to coax more information
from him, but I am not sure it's worth it.
<snip>
--
Ben.
|
|
|