isn't timestamp a MySQL reserved word
what data type is it.?
Assuming you have used the datetime datatype it will be quicker if you could index the column 'timestamp'. Im not to sure if the SQL engine can use an index if you are converting a datetime value into a string.
another good reason to use the date time functions is that you can use those functions to specify a range
use the BETWEEN sub clause in the WHERE
the only wrinkle is the first value after the BETWEEN MUST be lower than the second value
so thats going to be something like:_
SELECT my, comma, separated, list, of, columns FROM mytable
WHERE mydatecolumn BETWEEN DATE_ADD('2013-03-13', INTERVAL DAY -2) AND DATE_ADD('2013-03-13', INTERVAL DAY +2)
if you have stored a time element in the column then you may need to tweak the the upper limit as adding 2 days to, say 13 March 2013 will include all rows whose date is less than or equal to 13 March 2013 BUT WILL EXCLUDE all rows which occured on 13 March 2013 after midnight ie 13 March 2013 00:00:00
I'd rather be riding on the Tiger 800 or the Norton