So I was wondering why this prepared statment would not work
$makr = 'users';
$stm = $con->prepare("SELECT * FROM ?");
$stm->bindparam(1, $makr);
$stm->execute();
I keep getting this error.
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dd23834_house.'users'' doesn't exist' in /nfs/c11/h05/utt/23824/domains/.../html/home.php:77 Stack trace: #0 /nfs/c11/h05/utt/23824/domains/.../html/home.php(77): PDOStatement->execute() #1 {main} thrown in /nfs/c11/h05/utt/23824/domains/.../html/home.php on line 77
Yes I do have a table named Users.
I only want to grab everything from the users DB, I do NOT have a where clause in that but I also want it to be secure.