How to select every date before now in timestamp? my database feild type is timestamp here is my code I used it but It also gave me today date 
I need every date before today

"SELECT * FROM {mytable} WHERE  date &lt;".$now_timestamp."  "


please help me
Thank you
You could just use strtotime() to get yesterday's date instead of using a DateTime object:

$yesterday = strtotime('-1 day');

$sql = 'SELECT * FROM {mytable} WHERE date &lt; :timestamp';

$result = db_query($sql, array(':timestamp' =&gt; $yesterday));