After a long work on it i am here going to ask my question, its simple but i don’t know why it is not working, please help!!!
I have a table
phpfox_friend (where i have the below columns)
- friend_id
- user_id
- friend_user_id
- ordering
phpfox_user (where i have below columns)
- usre_id
- user_name
- status_id
- full_name
I am trying to inner join it by using below mentioned Sql query, but it give me an error
#1054 – Unknown column ‘phpfox_friend.user_id’ in ‘on clause’
Query
SELECT *
FROM `phpfox_friend`
INNER JOIN `phpfox_user`
ON `phpfox_friend.user_id`=`phpfox_user.user_id`
WHERE phpfox_user.user_name IS NOT NULL
Kindly guide me what i am doing wrong in it
try this:
you need to add the quotes to tables and to the fields.
so use