I have to write a MySQL query for fetching result from my database with a specified date and code like ABH18 or ABH17 or ABH19. I write the query like below.
select * from tbl_transaction where
trans_name like 'ABH19%' or trans_name like 'ABH18%'
or trans_name like 'ABH17%' or trans_name like 'ABH15%'
and date_of_vazhipad='2013-11-20' and trans_status='Completed successfully.'
There are no results in the DB satisfying all above conditions.But I got a result with different dates. But I want to ensure the date_of_vazhipad='2013-11-20' so that the query may work properly.