I've got a string that looks like this :
use Illuminate\Database\Capsule\Manager as DB;
DB::select("SELECT id FROM table_?", [$var]);
So the query would look like SELECT id FROM table_users.
The problem is that I get a syntax error :
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '?' at line 1
Why won't eloquent (or PDO in general) replace a ? attached to a string?