RE: [PHP-DB] MySql query
| From: | USA) | Date: | Wed, 17 Mar 2004 20:13:30 +0000 |
| Subject: | RE: [PHP-DB] MySql query | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-33491@lists.php.net to get a copy of this message | ||
One reason that my queries will look like what you described is that
later I append more conditions. The where 1 allows me to tack them all
on with AND or OR instead of having to put the where on later and decide
things like if I need to put AND or OR or WHERE or whatever... The WHERE
1 keeps it simple....
<>< Ryan
-----Original Message-----
From: Adam Voigt [mailto:adam@kotisprop.com]
Sent: Wednesday, March 17, 2004 10:15 AM
To: Matt Matijevich
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] MySql query
Yes, where evaluates to true.
On Wed, 2004-03-17 at 12:03, Matt Matijevich wrote:
> This is probably a question for for a mysql list but I figured someone
> out here knows the answer.
>
> I am working with an existing mysql application and there is a bunch
> of queries that are formatted something like this:
>
> SELECT * FROM sometable WHERE 1
>
> does "WHERE 1" just return every row?
>
> thanks in advance.
--
Adam Voigt
adam@kotisprop.com
--
PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php