Sql Query To Get Previous Month Php