我必须编写一个MySQL查询来获取我的数据库中的结果,指定的日期和代码如ABH18或ABH17或ABH19。我写下面的查询。MySQL查询给出了错误的结果
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.'
有在DB没有结果满足上述所有conditions.But我得到不同日期的结果。但我想确保date_of_vazhipad ='2013-11-20',以便查询可以正常工作。