How to get case sensitive search result using
addFieldToFilter() of collection object in magento.
I want to get search result based on case sensitive search results.
ABCDE12 is not equal to
I am trying to get case sensitive search result from collection.
$couponCode = 'ABCde12'; $getCoupon = $this->couponFactory->create()->getCollection() ->addFieldToSelect(array('coupon_code','description')) ->addFieldToFilter('coupon_code',array('eq' => $couponCode))->getFirstItem();
In database ABCde12 and ABCDE12 both entry are created. I just want to fetch case sensitive record from table.
Any help would be Appreciated.