Bravo List
Register
Go Back   > Bravo List > P2P > Forum > Community Cafe
Reply
Thread Tools
  #1  
Old 13th November 2011, 05:04
it53lv's Avatar
it53lv it53lv is offline
Senior Member
 
Join Date: Feb 2011
Latvia
Posts: 134
Default 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 ?
Reply With Quote
  #2  
Old 13th November 2011, 05:14
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default
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/
Reply With Quote
  #3  
Old 13th November 2011, 07:18
it53lv's Avatar
it53lv it53lv is offline
Senior Member
 
Join Date: Feb 2011
Latvia
Posts: 134
Default
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&scaron;i, sēžot uz lieveņa, dzerot un smēķējot piektdienas pēcpusdienā,  meklējot kādu nodarbi. Satik&scaron;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&amp;id=160925621&amp;hash=99215b2109b9b8b4&amp;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'),
Reply With Quote
  #4  
Old 13th November 2011, 11:49
Optix's Avatar
Optix Optix is offline
Senior Member
 
Join Date: Sep 2011
France
Posts: 145
Default
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 ^^
Reply With Quote
  #5  
Old 13th November 2011, 17:35
it53lv's Avatar
it53lv it53lv is offline
Senior Member
 
Join Date: Feb 2011
Latvia
Posts: 134
Default
it's not easy because new db needs 4 times less data
Reply With Quote
Reply

Tags
database , import


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 22:10. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.