Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Selective Backup FAILS !


Recommended Posts

When I modify the backup.php script to perform a selective backup it fails with ...


I am using version 1.01 Selective backup ...


1064 - You have an error in your SQL syntax near '15' at line 1

show fields from 15



Changing the code from


line 45

   $tables_query = tep_db_query('show tables');
	while ($tables = tep_db_fetch_array($tables_query)) {
	  list(,$table) = each($tables);


to this


// BOF selective backup by PATRIOT
	$table_files = array(DIR_FS_CATALOG. 'includes/database_tables.php', DIR_WS_INCLUDES. 'database_tables.php');
	foreach ($table_files as $table_file){
		$file = file($table_file);
		while (list(, $line) = each($file)){
			$line = trim($line);
			if (substr($line, 0, 6) != 'define') continue;
			$line = str_replace(' ', '', $line);
			$begin = strpos($line, "','")+3;
			$len = strrpos($line, "'") - $begin;
			$database_tables[] = substr($line, $begin, $len);
	$database_tables = array_unique($database_tables);

	foreach ($database_tables as $table){
// EOF selective backup by PATRIOT


causes my backup to fail ...


Any suggestions ?

Link to comment
Share on other sites

Don`t know that, you could try these.


AutoBackup Database in Admin http://addons.oscommerce.com/info/2314

Database backup manager http://addons.oscommerce.com/info/5769



Remember, What you think I ment may not be what I thought I ment when I said it.




Auto Backup your Database, Easy way


Multi Images with Fancy Pop-ups, Easy way


Products in columns with multi buy etc etc


Disable any Category or Product, Easy way


Secure & Improve your account pages et al.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...