You are here: Re: How do I copy a table for backup and restore purposes « PHP SQL « IT news, forums, messages
Re: How do I copy a table for backup and restore purposes

Posted by J.O. Aho on 11/22/07 20:13

Flemming wrote:

> I thought this would be a relatively easy task, but this does not appear
> to be the case. Or maybe I am blind. I can see in phpMyAdmin the SQL
> statements needed to create a new empty table and copy the content from
> the original table. I could of course copy this code into PHP, but what
> then if I change a table? Then I need to change this code as well.

You can try with the following SQL statement:

CREATE TABLE backuptable SELECT * FROM table_to_backup

You can use it easilly both from phpMyAdmin and from your custom made php script.

--

//Aho

 

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

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