You are here: Using SELECT INTO to Backup a Database « PHP Programming Language « IT news, forums, messages
Using SELECT INTO to Backup a Database

Posted by himilecyclist on 07/26/06 15:18

I am trying to use the SQL "SELECT INTO" to create a copy of a MySQL
database.

My PHP code looks like this:

<?php

//Connect to server and database

include ("Connections/ovrs.inc");

if (isset($_POST['cmdBackup']))
{
$sql = "SELECT * INTO edenbackup FROM edenmaster";


$result = mysql_query($sql) or die
(ErrorCall(mysql_error(),"frmBackup.php","1"));

echo "The Backup is Complete";
}

?>

I get an SQL error when running this. If I change the SQL Statement to
be "SELECT * FROM edenmaster" it works fine, so I know the connection
is OK.

What is the correct syntax for "SELECT * INTO" for MySQL?

Thanks!

 

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

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