[SOLVED] select with time

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

[SOLVED] select with time

Post by pelegk2 »

i have this select

Code: Select all

SELECT from_unixtime(TAARICH_HASPAKA),from_unixtime(TAARICH_TEUDA,'%d.%m.%Y %h%:%i:%s'),sent FROM order_header WHERE TAARICH_TEUDA!=''and from_unixtime(TAARICH_TEUDA,'%d.%m.%Y %h%:%i:%s')<'23.02.2005 8:00:00'
when i run this query and for example the
TAARICH_TEUDA=='23.02.2005 12:14:00'
this value shouldn't been show beacuse i asked for

Code: Select all

from_unixtime(TAARICH_TEUDA,'%d.%m.%Y %h%:%i:%s')<'23.02.2005 8:00:00'
any idea?
thnaks in advance
peleg
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

it's using string comparison, it was performing correctly.. you need to compare against '23.02.2005 08:00:00'
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

thnaks alot!

Post by pelegk2 »

:)
Post Reply