KEY `cat_parent_id` (`cat_parent_id`),
Posted: Sat Mar 20, 2010 1:13 pm
hi guys!!
while going through a tutorial, i found the following query used in it:
and here i am confused about the use of
while going through a tutorial, i found the following query used in it:
CREATE TABLE IF NOT EXISTS `tbl_category` (
`cat_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`cat_parent_id` int(11) NOT NULL DEFAULT '0',
`cat_name` varchar(50) NOT NULL DEFAULT '',
`cat_description` varchar(200) NOT NULL DEFAULT '',
`cat_image` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`cat_id`),
KEY `cat_parent_id` (`cat_parent_id`),
KEY `cat_name` (`cat_name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=18 ;
and here i am confused about the use of
why are they used?KEY `cat_parent_id` (`cat_parent_id`),
KEY `cat_name` (`cat_name`)