Connecting Tech Pros Worldwide Forums | Help | Site Map

where.. between

Newbie
 
Join Date: May 2006
Posts: 31
#1: Jun 21 '06
hai..

i'm doing a program about searching. but, i have some probem when using 'between'. this is my program:

SELECT eID, REPLACE(eTitle, '''', '''')as eTitle, REPLACE(eDescription, '''', '''')as eDescription, eSystemID, eDateStart, eDateEnd, eDurationSet, eDateCreated, eAuthorID, eTemplate, eStatus FROM vm_examdb.vm_examset WHERE eStatus = 'Approved' BETWEEN DATE_FORMAT(eDateStart, '%Y-%m-%d') <= '2006-06-21' AND DATE_FORMAT(eDateEnd, '%Y-%m-%d') >= '2006-06-21' OR DATE_FORMAT(eDateStart, '%Y-%m-%d') = '0000-00-00' ORDER BY eID ASC

the problem is, the system does not sort the eStatus = 'Approved'.
can anyone help me

Newbie
 
Join Date: Jul 2006
Posts: 3
#2: Jul 6 '06

re: where.. between


hy sakurasyi

try to change data format dd-mm-yyy, or check format columns in the table. Evrithing in write correct

bye
Reply