Hi, I'm trying to write a Perl script that will automate the backing up of the tables in my database. I'm building an array of the tables in the database, using show tables, and then I step through the array with a foreach loop. I've setup the SQL statement (to do the backup) as follows: $sth_backup = $dbh->prepare("BACKUP table ? TO ?"); And I'm calling it like this: $sth_backup->execute($table_name, $backup_location) || warn "Cant backup table $table_name: $DBI::errstr"; I've tried various values for $backup_location, but I can't seem to get it to work. When I use 'c:/' I get this: DBD::mysql::st execute failed: You have an error in your SQL syntax near ''iteration_failure' TO 'c:/'' at line 1 at backup_tables.pm line 24 When I use 'c:\' I get this: Bareword found where operator expected at backup_tables.pm line 18, near "$sth_tables->execute () || die "Can't" (Might be a runaway multi-line '' string starting on line 11)(Missing operator before t?) String found where operator expected at backup_tables.pm line 25, near "|| warn "" (Might be a runaway multi-line "" string starting on line 18) (Missing semicolon on previous line?) Anyone have any thoughts on what I need to do to get this to work? Thanks in advance, C. Duncan Hudson Dynax Solutions, Inc. Tel 216.292.8203 FAX 216.292.8273 EMail [EMAIL PROTECTED]
--------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php