You are here: Re: from mysql to php « All PHP « IT news, forums, messages
Re: from mysql to php

Posted by Lorenzo Bettini on 01/15/07 16:00

J.O. Aho wrote:
> Lorenzo Bettini wrote:
>> J.O. Aho wrote:
>>> Lorenzo Bettini wrote:
>>>
>>>> OK, I need a php framework that reads the structure of a mysql table
>>>> and generates php code that can recreate that table in another mysql
>>>> database.
>>>
>>> What about using mysqldump?
>>>
>>
>> I know that too, but I'd like then to be able to recreate the table
>> from php; do you actually suggest to load from php that file and using
>> a mysql_xxx command to recreate the table?
>
> Yes, php calls mysqldump and creates you a sql file, which you can then
> upload to your other database and use mysqldump to inject it.
>
>
>> I'd like to have a finer grain control: e.g., being able to have all
>> the structure fields, but create only on field...
>
> You can process the mysqldump output and remove things you don't want to
> transfer.

yes, and I was wondering whether there's something that already does
this, without having to program it.

Consider the scenario where you have a database with tables that need to
be updated to a new version (some structures have changed).

--
Lorenzo Bettini, PhD in Computer Science, DSI, Univ. di Firenze
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация