I have tried to execute the code below but when I tryvar_dump $query
i have the next: ...{ ["queryString"]=> string(44) "SELECT * FROM
postsWHERE :where LIMIT 15;" }
code:
$query = Main::$data_base->pdo->prepare(
'SELECT ' . $fields . ' ' .
'FROM `posts` ' .
'WHERE :where ' .
'LIMIT ' . $posts_quantity . ';'
);
$query->bindParam( ':where', $where, PDO::PARAM_STR );
$query->execute();