Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #2458

Re: Copying data between databases

From Mick Gurling <nospam@myemail.net>
Newsgroups comp.lang.php
Subject Re: Copying data between databases
Date 2011-07-07 04:51 +0000
Organization A noiseless patient Spider
Message-ID <iv3e02$30v$2@dont-email.me> (permalink)
References <lOaRp.57779$8G4.34016@newsfe17.iad>

Show all headers | View raw


http://www.tonymarston.net/php-mysql/databaseobjects.html

Use his objects or read how he uses the database connections.

Mick

On Wed, 06 Jul 2011 23:41:57 -0500, Sloan wrote:

> Hi all,
> 
> I'm a bit new to PHP, but have been programming in other languages for
> quite a while. I'm pretty good a SQL, including MySQL.
> 
> Here's my question:
> 
> How do I connect to two databases (on the same server) to use an INSERT
> .... ON DUPLICATE KEY UPDATE in PHP were the source table in one
> database, and the destination table is in another?
> 
> I've written the SQL statement with explicit db.table.field references
> so I think I can use mysql_query, but which link do I use, or how can I
> pass both links?
> 
> Thanks in advance!
> 
> Sloan

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Copying data between databases "Sloan" <sloan@sloansweb.com> - 2011-07-06 23:41 -0500
  Re: Copying data between databases Mick Gurling <nospam@myemail.net> - 2011-07-07 04:51 +0000
    Re: Copying data between databases "Sloan" <sloan@sloansweb.com> - 2011-07-07 00:00 -0500
      Re: Copying data between databases The Natural Philosopher <tnp@invalid.invalid> - 2011-07-07 07:09 +0100
  Re: Copying data between databases The Natural Philosopher <tnp@invalid.invalid> - 2011-07-07 05:56 +0100
  Re: Copying data between databases "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2011-07-07 08:28 +0200

csiph-web