I have to show the records from A to G resutls from database. also tried the following code to show. Is there any mysql function available or should we use php to customize it.
Mysql query
SELECT * FROM `wp_postmeta` WHERE `meta_key` = 'state' AND `meta_value` LIKE 'A%G'
Expected output
States start from A thru G States H thru J
Alabama Hawaii
Georgia Louisiana