> Programming Languages > PHP
Various Topics Home | Disclaimer | Report Adult Posts

Various Topics on PHP



PHP - "Updating DB Locally" in Programming Languages


Old 06-20-2004   #1
..i..
 
Default Updating DB Locally

I have a database on my local machine that I make entries and
corrections on. I'd like to be able to upload that to my server and have
that update the database that's on the server. What I've been doing is
saving the local file as a backup. Then I have to edit the backup,
deleting the create file info and all previously uploaded entries before
I can import the text file to the server.

Is there an easier way to do this so I won't get duplicate entry
notices. I'd like the info from my local file to overwrite the server
file like FTPing a new web page will overwrite the old one. Is this
possible to do with mySQL?

 
Old 06-21-2004   #2
..cha.. ..st..
 
Default Re: Updating DB Locally

Paige wrote:

> I have a database on my local machine that I make entries and
> corrections on. I'd like to be able to upload that to my server and have
> that update the database that's on the server. What I've been doing is
> saving the local file as a backup. Then I have to edit the backup,
> deleting the create file info and all previously uploaded entries before
> I can import the text file to the server.
>
> Is there an easier way to do this so I won't get duplicate entry
> notices. I'd like the info from my local file to overwrite the server
> file like FTPing a new web page will overwrite the old one. Is this
> possible to do with mySQL?
>


First, you have not given enough information to give you the proper
response.

What platform (specifically the OS)

Are the corrections/changes DDL (table/column definitions) or DML
(insert/update/delete)?

Is the data in the database static (read w/occasional updates) or is it
a read/write database (new information stored daily).

I take it that your "local machine" is a test system and the other is
"production"

If you do not care what is in your production database and it gets
over-written with the new version:

Backup/Restore your database from one place to another...

http://www.phpbb.com/phpBB/viewtopic.php?t=9963

Michael Austin.

PS -- I would backup the "production" database for safe keeping before
trying this...





 
Old 06-21-2004   #3
..i..
 
Default Re: Updating DB Locally

Michael Austin wrote:
> Paige wrote:
>
>> I have a database on my local machine that I make entries and
>> corrections on. I'd like to be able to upload that to my server and
>> have that update the database that's on the server. What I've been
>> doing is saving the local file as a backup. Then I have to edit the
>> backup, deleting the create file info and all previously uploaded
>> entries before I can import the text file to the server.
>>
>> Is there an easier way to do this so I won't get duplicate entry
>> notices. I'd like the info from my local file to overwrite the server
>> file like FTPing a new web page will overwrite the old one. Is this
>> possible to do with mySQL?
>>

>
> First, you have not given enough information to give you the proper
> response.
>
> What platform (specifically the OS)


Win XP

> Are the corrections/changes DDL (table/column definitions) or DML
> (insert/update/delete)?


I guess they'd be DML. Nothing changes as to columns or definitions. The
only thing that might change would be the info already stored in an
entrylike if someone was to move and change their address, that sort of
thing. And of course, the new version that I would want to upload would
have more total entries than the old one.

> Is the data in the database static (read w/occasional updates) or is it
> a read/write database (new information stored daily).


static

> I take it that your "local machine" is a test system and the other is
> "production"


I guess that's a fair ***essment. I want to do the work on my WinXP,
then upload the table to the server to replace what is there so I don't
have to be online when I want to work on the database.

> If you do not care what is in your production database and it gets
> over-written with the new version:


> Backup/Restore your database from one place to another...
>
> http://www.phpbb.com/phpBB/viewtopic.php?t=9963


Thank you for this suggestion and maybe it's me but this thread seems to
involve backing up and restoring phpbb databases on a *new* server/host.
If that was my situation, I would have no problem as there would be no
entries on the new server so there couldn't be any duplicate ones in the
upload. But it's the same table on the same server that I'm looking to
do with the new one overwriting the old one.

 
Old 06-21-2004   #4
..cha.. ..st..
 
Default Re: Updating DB Locally

Paige wrote:

> Michael Austin wrote:
>
>> Paige wrote:
>>
>>> I have a database on my local machine that I make entries and
>>> corrections on. I'd like to be able to upload that to my server and
>>> have that update the database that's on the server. What I've been
>>> doing is saving the local file as a backup. Then I have to edit the
>>> backup, deleting the create file info and all previously uploaded
>>> entries before I can import the text file to the server.
>>>
>>> Is there an easier way to do this so I won't get duplicate entry
>>> notices. I'd like the info from my local file to overwrite the server
>>> file like FTPing a new web page will overwrite the old one. Is this
>>> possible to do with mySQL?
>>>

>>
>> First, you have not given enough information to give you the proper
>> response.
>>
>> What platform (specifically the OS)

>
>
> Win XP
>
>> Are the corrections/changes DDL (table/column definitions) or DML
>> (insert/update/delete)?

>
>
> I guess they'd be DML. Nothing changes as to columns or definitions. The
> only thing that might change would be the info already stored in an
> entrylike if someone was to move and change their address, that sort of
> thing. And of course, the new version that I would want to upload would
> have more total entries than the old one.
>
>> Is the data in the database static (read w/occasional updates) or is
>> it a read/write database (new information stored daily).

>
>
> static
>
>> I take it that your "local machine" is a test system and the other is
>> "production"

>
>
> I guess that's a fair ***essment. I want to do the work on my WinXP,
> then upload the table to the server to replace what is there so I don't
> have to be online when I want to work on the database.
>
>> If you do not care what is in your production database and it gets
>> over-written with the new version:

>
>
>> Backup/Restore your database from one place to another...
>>
>> http://www.phpbb.com/phpBB/viewtopic.php?t=9963

>
>
> Thank you for this suggestion and maybe it's me but this thread seems to
> involve backing up and restoring phpbb databases on a *new* server/host.
> If that was my situation, I would have no problem as there would be no
> entries on the new server so there couldn't be any duplicate ones in the
> upload. But it's the same table on the same server that I'm looking to
> do with the new one overwriting the old one.
>



If users of the "production" database can change their information and
you make different changes to your "local" database, then you must
guarantee that one does not overwrite the other. Basically you need to
be able to synchronize your databases not overwrite them... true? Next
question is this just one table or multiple tables?


Michael.
 

Thread Tools
Display Modes





Powered by vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0