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:[EMAIL PROTECTED] 
Sent: Wednesday, March 17, 2004 10:15 AM
To: Matt Matijevich
Cc: [EMAIL PROTECTED]
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
[EMAIL PROTECTED]

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

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

Reply via email to