Re: Re: Database Problems

tamouse mailing lists <[email protected]>
Newsgroups gmane.comp.php.database
Message-ID <CAHUC_t8Y-SL2gCPsLBNN4HtNZM9+NS_VV7XqfMrMpbZO2CsGrw@mail.gmail.com>
On Mon, Jun 25, 2012 at 9:46 PM, tamouse mailing lists
<[email protected]> wrote:
> On Mon, Jun 25, 2012 at 7:57 AM, Peter Beckman <[email protected]> wrote:
>>  I'll save you some time, it's not the "where 1" part of the query:
>>
>>    mysql> select count(*) from numbers where 3 and num like '1212%';
>
> The only time the where clause fails (rightly so) with a single number
> like what is when you do "where 0".
>
> mysql> select count(*) from quotes where 0;
> +----------+
> | count(*) |
> +----------+
> |        0 |
> +----------+
> 1 row in set (0.00 sec)
>
> mysql> select count(*) from quotes where 1;
> +----------+
> | count(*) |
> +----------+
> |      727 |
> +----------+
> 1 row in set (0.00 sec)
>
> Note that the where clause failing does NOT mean the select failed. It
> correctly returned 0 rows.

Ooops, I mean *1* row with value zero. /o\

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.