Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
| Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 7th, 2004, 10:36 AM
Registered User
 
Join Date: Jun 2003
Location: Ludhiana, Punjab, India.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Dr Robert James Send a message via AIM to Dr Robert James Send a message via MSN to Dr Robert James Send a message via Yahoo to Dr Robert James
Default How to merge 2 sql's

Hello friends

Is there a way to combile two sql database's , so that the members, and posts of both the sql's are merged.

I have 2 sqls, but I dont want my current forum to be corrupted. is there a way
to add sql data to my current forum? maybe members and posts of second sql
be added after members and posts of the first sql in the forum.

if not on server, can I do it on my pc ?? ... >>> I have IIS with
mysql and phpmyadmin working fine, with a test forum also on the PC.

Thanks


Robert James
MD (Internal Medicine)
Ph:919815897656
www.jamesmedline.com
www.onlinemdicalforum.com
Email:
info@jamesmedline.com
 
Old December 7th, 2004, 11:10 AM
Authorized User
 
Join Date: Dec 2004
Location: Tunkhannock, PA, USA.
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to peg110
Default

Consider checking http://p2p.wrox.com/topic.asp?TOPIC_ID=22654 for a place to start. See if that can help you.

Otherwise Maybe you could be more specific of your intent. Are your tables exactly the same? (Number of fields and type) How many tables? etc...




Paul Gardner
------------------
PHP-LIVE help
Via Web @ http://www.mnetweb.co.uk/irc
Via IRC Client pgardner.net:6667
room #PHP
 
Old December 9th, 2004, 10:39 AM
ry ry is offline
Registered User
 
Join Date: Dec 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Only problem I could see with that is if the two sql databases have, for example, member_id as a primary key merging them *may* mean that the id numbers are replicated.

But I am usually wrong ;)
 
Old December 9th, 2004, 02:23 PM
Authorized User
 
Join Date: Dec 2004
Location: Tunkhannock, PA, USA.
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to peg110
Default

True... This would be assumming that the final database to which the records would be stored would have to have that limitation of a Primary Key. In that case you would NOT have replicated numbers, (because the PK would not allow it), but you would lose data, unless you did some "Creative" scripting to check for this info. P

Paul Gardner
------------------
PHP-LIVE help
Via Web @ http://www.mnetweb.co.uk/irc
Via IRC Client pgardner.net:6667
room #PHP




Similar Threads
Thread Thread Starter Forum Replies Last Post
2 SQL's possible with an IF? myself Classic ASP Professional 10 June 4th, 2006 01:00 PM
Need Help In Mail Merge raghur Access VBA 0 September 8th, 2005 05:46 AM
Merge PDFs cherry111 Excel VBA 2 February 28th, 2005 04:37 PM
How do I merge these two codes? stacy Classic ASP Basics 3 April 12th, 2004 03:51 AM
How do I merge these two codes? stacy Classic ASP Databases 1 March 22nd, 2004 04:30 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.