i get this error, when i use select
$listchat = $pdo->prepare("SELECT * FROM listchat WHERE ?, userkey=?, ORDER BY idroom ASC LIMIT ?");
then
$num = 10;
$gid = 0;
$listchat->execute([$gid,$userKey,$num]);
I get the post title error, where am I wrong?
Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 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 ' userkey='66756',