|
#1
|
||||
|
||||
Import database
Anyone here knows anything about importing database from script to script ?
Like convert data from one to other with php functions ? I have 2mb database with 1300 entries i need to convert to my script so i'm looking for a way. Any ideas ? |
#2
|
||||
|
||||
can you give an example?
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent Do not ask me to make a mod for any other source Do not Ask me to setup your site. I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum My Current Demo is here http://demo.btmanager.org/ |
#3
|
||||
|
||||
Code:
INSERT INTO `it_post` (`id`, `autor`, `date`, `short_story`, `full_story`, `xfields`, `title`, `descr`, `keywords`, `category`, `alt_name`, `comm_num`, `allow_comm`, `allow_main`, `allow_rate`, `approve`, `fixed`, `rating`, `allow_br`, `vote_num`, `news_read`, `votes`, `access`, `symbol`, `flag`, `editdate`, `editor`, `reason`, `view_edit`, `tags`, `metatitle`) VALUES (1, 'lordof', '2011-08-02 22:00:31', '<p><span style=\\"font-size: 8pt;\\">Kregs un Smokijs ir divi losandželosas puiši, sēžot uz lieveņa, dzerot un smēķējot piektdienas pēcpusdienā, meklējot kādu nodarbi. Satikšanās ar kaimiņiem un draugiem dienas un nakts laikā, ar nepārspējamiem jokiem veido filmas turpinājumu.</span></p>', '', 'trailer|http://vkontakte.ru/video_ext.php?oid=141382825&id=160925621&hash=99215b2109b9b8b4&hd=1||poster|/posters/friday.jpg', 'Piektdiena', 'Welcome to the demo page of DataLife Engine. DataLife Engine is a multi-user news engine, has more features. Engine is designed primarily for the creation of blogs and news sites with great', 'Engine, DataLife, large, creation, virtually, information, features, problems, assistance, minimal, mapping, audience, system, resources, optimized, server, prompt, Vietnamese, people, there', '27', 'post1', 0, 1, 1, 1, 1, 0, 9, 0, 2, 239, 0, '', '', 1, '1312617895', 'lordof', '', 0, '', ''), convert to Code:
INSERT INTO `pbit_videos` (`video_id`, `member_id`, `filename`, `preview`, `description`, `fcategorie`, `dateadded`, `adult`, `active`, `totalvotes`, `totalscore`, `rated`, `comments`, `totalcomments`, `totalviews`, `notes`) VALUES (1, 2, 'http://vkontakte.ru/video_ext.php?oid=141382825&id=160925621&hash=99215b2109b9b8b4&hd=1', '/posters/friday.jpg', 'descriptioooooon', 4, 2011, 0, 1, 0, 0, 1, 1, 0, 2, 'test1'), |
#4
|
||||
|
||||
Convert a SQL dump isn't the best solution.
You can migrate datas easily by rename and replace columns from the db source. Don't search complicated ^^
__________________
|
#5
|
||||
|
||||
it's not easy because new db needs 4 times less data
|
Tags |
database , import |
|
|