$sth = $dbh->prepare("INSERT INTO ? (ip,bsid,firmware) VALUES (?, ?, ?)"); $sth->execute($table_name,$ip,$bsid,$firmware);