mysql - php select query unknown column in field list? -
i'm having error in mysql query (error code : 1054 unknown column 'p.post_id' in 'field list') post_id
present in post table can 1 me in issue
select u.iname , p.post_id,p.file_path users u inner join likes l on u.user_id=l.user_id inner join notify n on p.post_id=n.post_id inner join post p on p.user_id=u.user_id u.user_id=3 , n.notify=1
tables not joined in correct order, cant reference post_id in second join posts table isn't joined yet.
select u.iname, p.post_id, p.file_path users u inner join likes l on u.user_id = l.user_id inner join post p on u.user_id p.user_id inner join notify n on p.post_id = n.post_id u.user_id = 3 , n.notify = 1
Comments
Post a Comment