INNER JOIN syntax for mySQL using phpmyadmin

SELECT Question.userid, user.uid FROM `question` WHERE NOT `userid`=2 LIMIT 0, 60 INNER JOIN `user` ON `question`.userid=`user`.uid ORDER BY `question`.userid 

Returns Error:

You have an error in the SQL syntax; check the manual that matches your version of MySQL server for the correct syntax to use next to 'INNER JOIN User ON question .userid = User .uid ORDER BY question .userid' on line 5

It is impossible for me to find out what I am doing wrong here.

+4
source share
1 answer

Your request is invalid. You can try the following:

 SELECT `question`.userid, `user`.uid FROM `question` INNER JOIN `user` ON `question`.userid = `user`.uid WHERE `userid` <> 2 ORDER BY `question`.userid LIMIT 0, 60 
+8
source

Source: https://habr.com/ru/post/1311156/


All Articles