Display posts between two particular dates

I think its because the SQL statement needs the dates inside the quotation marks. Try

$where .= " AND post_date >= '$s' AND post_date <= '$e'";

That should work, otherwise, try

$where .= " AND post_date >= '".$s."' AND post_date <= '".$e."'";

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)