mysql – Error Code: 1064. You have an error in your SQL syntax;

05/02/2018


When I execute this query

SELECT
*
FROM
user
INNER JOIN friend
ON user.user_id = friend.friend_id
WHERE friend.user_id = :userId
ORDER BY user.firstName ASC

I get this error:

Error Code: 1064. You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use near ‘:userId ORDER BY user.firstName ASC’ at line 7

قالب وردپرس