Tricky SQL query

2001-04-23 Thread Andrei Zmievski
Hi, I have a table that keeps track of when certain articles go up on the site. It has a field called featureStart, which is a unix timestamp. The features stay on the site until the next feature replaces them, so there is no featureEnd. If one feature started on Apr 23 and another one is schedul

Re: Key trouble

2001-01-23 Thread Andrei Zmievski
On Tue, 23 Jan 2001, Gerald L. Clark wrote: > > Why isn't it using index on the last query? > > > Because there isn't an index that contains both fields. So it can't use separate indexes? I guess the obvious solution would be to create an index on both of those fields, but I will also need to h

Key trouble

2001-01-23 Thread Andrei Zmievski
Just installed 3.23.29-gamma and played around with fulltext indexes and some other stuff. Ran into a weird problem that I hope you can shed some light on. Basically, a query's where clause has two parts joined by 'and': select count(*) from ARTICLES where Publication_ID = 9 and Status =

Re: VARCHAR comparison problem

2001-01-20 Thread Andrei Zmievski
At 06:34 PM 1/20/01 -0800, Jeremy D. Zawodny wrote: >MySQL does trailing whitespace removal on all VARCHAR data as >described in the manual. Hmm, well that presents a problem in my application that counts on exact comparisons - I guess a way to do it is to use 'like' instead of '='? -Andrei

VARCHAR comparison problem

2001-01-20 Thread Andrei Zmievski
Hi, I recently ran into a problem when doing comparison against varchar field. Basically, comparing 'foo' and 'foo ' (note extra space) against the records produced the same results - almost as if MySQL trims the whitespace from the search parameter before running the search. Can anyone shed ligh