Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Community Cafe (http://www.bvlist.com/forumdisplay.php?f=18)
-   -   Import database (http://www.bvlist.com/showthread.php?t=7191)

it53lv 13th November 2011 05:04

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 ?

joeroberts 13th November 2011 05:14

can you give an example?

it53lv 13th November 2011 07:18

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', '

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.

', '', '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'),


Optix 13th November 2011 11:49

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 ^^

it53lv 13th November 2011 17:35

it's not easy because new db needs 4 times less data


All times are GMT +2. The time now is 13:49.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.