I have db table structure like that :
--
-- Table structure for table `table_submissions`
--
CREATE TABLE IF NOT EXISTS `table_submissions` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Submission ID',
`item_name` bigint(20) unsigned NOT NULL COMMENT 'Item Name',
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0 = pending, 1 = approved, -1 = denied',
PRIMARY KEY (`id`),
KEY `item_name` (`item_name`),
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
php
$date_info = $db->fetchOne("SELECT * FROM table_submissions");
I need to code php for "Most Required Item" order by count item_name limit 10
This mean the most item_name
which the visitor has been required it will be in the top then ++ 9
How i can do that please ?