views:

23

answers:

1

How can this be done properly in MySQL? I want to select records that are created after a specific date AND time... I thought something simple like this would do the trick, but I think it needs a bit more to it to work.

SELECT `modified` FROM `Blog` WHERE `modified` > 2010-01-08 16:01:01

Any help appreciated.

+2  A: 

I think you are missing some quotes:

SELECT `modified` FROM `Blog` WHERE `modified` > '2010-01-08 16:01:01'

You might also want to select some other fields apart from just the modified field. You could start with this until you know which fields you want:

SELECT * FROM `Blog` WHERE `modified` > '2010-01-08 16:01:01'
Mark Byers
that's all it was. Thanks
Jenski