select * from fin_history a, categories b, category_master c where c.category like 'Birth' and c.category_id=b.category_id and a.row_id=b.history_id and a.year= and month=0 and date=function.mysql order by month