In message <[EMAIL PROTECTED]>, Brian Cummiskey
<[EMAIL PROTECTED]> writes
>cdg1111us wrote:
>> Have you tried breaking your where clause ('$from_date_tt' <=
>> timestamp <= '$to_date_tt') into two statements like timestamp >=
>> $from_date_tt and timestamp <= $to_date_tt?
>>
>>
>
>This is what the BEWTEEN keyword is used for:
>
>select * from table where timestamp BETWEEN Xtime and Ytime
err... no...
Select is used as:
SELECT * FROM table WHERE field BETWEEN lowvalue AND highvalue
This is the "opposite".. the unworkable
SELECT * FROM table WHERE value BETWEEN fieldA AND fieldB
or as the original poster said
SELECT * FROM table WHERE ( fieldA < value < fieldB )
As far as I can see, this can only be
SELECT * FROM table WHERE value > fieldA AND value < fieldB
--
Pete Clark
Sunny Andalucia
http://www.hotcosta.com/comm_1.htm