How can i insert a database to joomla database?

Discussion in 'MySQL' started by dumaniac, Sep 23, 2007.

  1. #1
    I have a database and i want to insert it into my existing joomla database(both mysql)
    table structure of joomla:
    CREATE TABLE IF NOT EXISTS `jos_content` (
      `id` int(11) unsigned NOT NULL auto_increment,
      `title` varchar(100) NOT NULL default '',
      `title_alias` varchar(100) NOT NULL default '',
      `introtext` mediumtext NOT NULL,
      `fulltext` mediumtext NOT NULL,
      `state` tinyint(3) NOT NULL default '0',
      `sectionid` int(11) unsigned NOT NULL default '0',
      `mask` int(11) unsigned NOT NULL default '0',
      `catid` int(11) unsigned NOT NULL default '0',
      `created` datetime NOT NULL default '0000-00-00 00:00:00',
      `created_by` int(11) unsigned NOT NULL default '0',
      `created_by_alias` varchar(100) NOT NULL default '',
      `modified` datetime NOT NULL default '0000-00-00 00:00:00',
      `modified_by` int(11) unsigned NOT NULL default '0',
      `checked_out` int(11) unsigned NOT NULL default '0',
      `checked_out_time` datetime NOT NULL default '0000-00-00 00:00:00',
      `publish_up` datetime NOT NULL default '0000-00-00 00:00:00',
      `publish_down` datetime NOT NULL default '0000-00-00 00:00:00',
      `images` text NOT NULL,
      `urls` text NOT NULL,
      `attribs` text NOT NULL,
      `version` int(11) unsigned NOT NULL default '1',
      `parentid` int(11) unsigned NOT NULL default '0',
      `ordering` int(11) NOT NULL default '0',
      `metakey` text NOT NULL,
      `metadesc` text NOT NULL,
      `access` int(11) unsigned NOT NULL default '0',
      `hits` int(11) unsigned NOT NULL default '0',
      PRIMARY KEY  (`id`),
      KEY `idx_section` (`sectionid`),
      KEY `idx_access` (`access`),
      KEY `idx_checkout` (`checked_out`),
      KEY `idx_state` (`state`),
      KEY `idx_catid` (`catid`),
      KEY `idx_mask` (`mask`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=431 ;
    PHP:
    Other database to be inserted:
    CREATE TABLE lyrics (
      id int(7) NOT NULL auto_increment,
      artist varchar(250) NOT NULL default '',
      title varchar(250) NOT NULL default '',
      album varchar(250) NOT NULL default '',
      letter char(2) NOT NULL default '',
      lyrics text NOT NULL,
      PRIMARY KEY  (id),
      FULLTEXT KEY artist (artist),
      FULLTEXT KEY title (title),
      FULLTEXT KEY album (album)
    ) TYPE=MyISAM;
    PHP:
    Note:I'm not much familiar with mysql..
     
    dumaniac, Sep 23, 2007 IP
  2. gsv13

    gsv13 Well-Known Member

    Messages:
    2,773
    Likes Received:
    114
    Best Answers:
    0
    Trophy Points:
    130
    #2
    phpmyadmin ->the database ->sql->Clear the text area and type in the other database to be inserted.
    Done :D
     
    gsv13, Sep 23, 2007 IP
  3. dumaniac

    dumaniac Well-Known Member

    Messages:
    398
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    110
    #3
    I wish it was that easy.If i do that how can the script recognize the tables?? :rolleyes:
     
    dumaniac, Sep 23, 2007 IP