Forums / Basic Configuration / Import Categories Description Mysql

Import Categories Description Mysql

Locked

Views: 1,348

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
10 Apr 2007, 3:36 AM
#1
cjsmiff avatar

cjsmiff

Zen Follower

Join Date:
Jul 2006
Location:
UK
Posts:
170
Plugin Contributions:
0

Import Categories Description Mysql

Hi

I am trying to import the categories descriptions using phpmyadmin and have the following text file:

--
-- Table structure for table categories_description

CREATE TABLE categories_description (
categories_id int(11) NOT NULL default '0',
language_id int(11) NOT NULL default '1',
categories_name varchar(32) NOT NULL default '',
categories_description text NOT NULL,
PRIMARY KEY (categories_id,language_id),
KEY idx_categories_name_zen (categories_name)
) TYPE=MyISAM;

--
-- Dumping data for table categories_description

INSERT INTO categories_description (categories_id, language_id, categories_name, categories_description)
VALUES
(1, 1, 'Acid Techno', ''),
(2, 1, 'Breakbeat', ''),
(3, 1, 'Classic Rave', ''),
(4, 1, 'Commercial Trance', ''),
(5, 1, 'Deep House', ''),
(6, 1, 'Deep Techno', ''),
(7, 1, 'Downtempo', ''),
(8, 1, 'Drum & Bass', ''),
(9, 1, 'Electro House', ''),
(10, 1, 'Euro Trance', ''),
(11, 1, 'Funky House', ''),
(12, 1, 'Funky Techno', ''),
(13, 1, 'Gabba', ''),
(14, 1, 'Hard House', ''),
(15, 1, 'Hard Core', ''),
(16, 1, 'Test1', ''),
(17, 1, 'Hard Techno', ''),
(18, 1, 'Hard Trance', ''),
(19, 1, 'Test2', ''),
(20, 1, 'Hardstyle', ''),
(21, 1, 'Hardtrance / Techno', ''),
(22, 1, 'Progressive House', ''),
(23, 1, 'Scratchtools', ''),
(24, 1, 'Tech/Hard/Euro/Vocal', ''),
(25, 1, 'Tech House', ''),
(26, 1, 'Tech Trance', ''),
(27, 1, 'Tech/US House', ''),
(28, 1, 'Techno', ''),
(29, 1, 'Tribal House', ''),
(30, 1, 'US/Tech House', ''),
(31, 1, 'US House', ''),
(32, 1, 'Vocal House', ''),
(33, 1, 'Vocal Trance', ''),
(34, 1, 'US/25', '');

Once run, the only categories that actually appear in my sites admin area are numbers 4 & 5.

I am running Zencart 1.3.7 with mysql 5.0

Any ideas why please?

Cheers
Claire

10 Apr 2007, 3:56 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Import Categories Description Mysql

This is the correct structure for this:

DROP TABLE IF EXISTS `categories`;
CREATE TABLE IF NOT EXISTS `categories` (
  `categories_id` int(11) NOT NULL auto_increment,
  `categories_image` varchar(64) default NULL,
  `parent_id` int(11) NOT NULL default '0',
  `sort_order` int(3) default NULL,
  `date_added` datetime default NULL,
  `last_modified` datetime default NULL,
  `categories_status` tinyint(1) NOT NULL default '1',
  PRIMARY KEY  (`categories_id`),
  KEY `idx_parent_id_cat_id_zen` (`parent_id`,`categories_id`),
  KEY `idx_status_zen` (`categories_status`),
  KEY `idx_sort_order_zen` (`sort_order`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=68 ;

-- 
-- Dumping data for table `categories`
-- 

INSERT INTO `categories` (`categories_id`, `categories_image`, `parent_id`, `sort_order`, `date_added`, `last_modified`, `categories_status`) VALUES 
(1, 'categories/category_hardware.gif', 0, 1, '2003-12-23 03:18:19', '2004-05-21 00:32:17', 1),
(2, 'categories/category_software.gif', 0, 2, '2003-12-23 03:18:19', '2004-05-22 21:14:57', 1),

Zen-Venom Get Bitten

16 Apr 2007, 12:26 AM
#3
cjsmiff avatar

cjsmiff

Zen Follower

Join Date:
Jul 2006
Location:
UK
Posts:
170
Plugin Contributions:
0

Re: Import Categories Description Mysql

Many thanks!

:smile: