Write a Mysql fetchPairs()
query using Magento standard way for fetching all SQL result rows as an array of key-value pairs.
You can write direct SQL query fetchPairs() without worrying about Model operation using below code snippet.
Return Type: fetchPairs() always return as an array with key-value pair as output. Continue reading “How to write a fetchPairs MySql query in Magento 2?”