I have this query
$prefix = 'de_';
$sql = "INSERT INTO $prefix.request_products (created_at, request_id) VALUES (NOW(), :request_id)";
Which would be working, but php or PDO (or both) are writing the dot within the query, the table name is de_request_products but the query is build as de_.request_products.
If I just use a space between $prefix and the string PDO throws an error.
Is there any other possibility of how to concatenate the string and the variable within the query, or is the only way to build it like this:
$prefix = 'de_';
$table = 'request_products';
$concat = $prefix.$table;
$sql = INSERT INTO $concat ...
"INSERT INTO ".$prefix."request_products ....or"INSERT INTO {$prefix}request_products ....