4 messages in com.mysql.lists.perlRe: Trouble automating backup
FromSent OnAttachments
Duncan Hudson14 Mar 2001 07:02 
Jochen Wiedmann14 Mar 2001 07:08 
Dodger14 Mar 2001 07:26 
Greg Meckes14 Mar 2001 07:54 
Subject:Re: Trouble automating backup
From:Jochen Wiedmann (jo@ispsoft.de)
Date:03/14/2001 07:08:08 AM
List:com.mysql.lists.perl

Duncan Hudson wrote:

$sth_backup = $dbh->prepare("BACKUP table ? TO ?");

You cannot embed table names or column names with the placeholder. If you do, that will not be mapped to

BACKUP table foo

but to

BACKUP table 'foo'

which will most probably fail.

Use

prepare("BACKUP table $table TO $othertable")

instead.