Re: Query not returning Data

2007-10-13 Thread Brent Baisley
That is a string comparison, so they will never be equal. You don't have to put quotes around field names unless you are using reserved words, which you shouldn't. If you do use "quotes" around field names, you need to use `backticks`. On Oct 10, 2007, at 1:15 PM, Martijn Tonies wrote:

Re: Query not returning Data

2007-10-10 Thread Martijn Tonies
> Sorry about double post, I am having problems with my ISP. > > I have the following query: > > SELECT * > FROM Sight_Hearing_Help > WHERE 'type_help' = "Eye Exam & Glasses" > AND 'board_action_date' BETWEEN "07-01-2007" AND "12-31-2007" > LIMIT 0 , 60; > > Returns empty row every time. The boar

Re: Query not returning Data

2007-10-10 Thread Stut
russbucket wrote: Sorry about double post, I am having problems with my ISP. I have the following query: SELECT * FROM Sight_Hearing_Help WHERE 'type_help' = "Eye Exam & Glasses" AND 'board_action_date' BETWEEN "07-01-2007" AND "12-31-2007" LIMIT 0 , 60; Returns empty row every time. The boa

RE: Query not returning Data

2007-10-10 Thread Jerry Schwartz
Have you tried testing the two parts of your WHERE clause separately? Regards, Jerry Schwartz The Infoshop by Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 www.the-infoshop.com www.giiexpress.com www.etudes-marche.com > -Original

RE: Query not returning Data

2007-10-10 Thread Little, Timothy
Oh boy.. having the date stored as a varchar in that particular format will be profoundly problematic. You might want to store it -MM-DD or the SQL BETWEEN will mangle the expected return results. Does it work (return a non-empty result-set) when you omit the LIMIT clause? Does it work (re

RE: Query not returning Data

2007-10-10 Thread Jay Blanchard
[snip] SELECT * FROM Sight_Hearing_Help WHERE 'type_help' = "Eye Exam & Glasses" AND 'board_action_date' BETWEEN "07-01-2007" AND "12-31-2007" LIMIT 0 , 60; [/snip] Try WHERE type_help LIKE '%Eye Exam & Glasses%' and look at your dates in the database themselves even if they are varchars, they ar

Re: Query not returning Data

2007-10-10 Thread russbucket
russbucket wrote: > I have the following query: > > SELECT * > FROM Sight_Hearing_Help > WHERE 'type_help' = "Eye Exam & Glasses" > AND 'board_action_date' BETWEEN "07-01-2007" AND "12-31-2007" > LIMIT 0 , 60; > > Returns empty row every time. The board_action_date is a varchar field. > Not a da