$tablename = 'tablename';
$db->bind("data1", $data1);
$db->bind("data2", $data2);
$db->bind("data3", $data3);
$insert = $db->query("INSERT INTO $tablename(data1,data2,data3) VALUES(:data1,:data2,:data3)");
Table and Column names cannot be replaced by parameters in PDO. In that case you will simply want to filter and sanitize the data manually.stackoverflow.com/questions/182287/can-php-pdo-sta...
в базе есть свыше 50 таблиц, одинаковой структуры.