i’d like to join 2 tables to show the users’ avatars from the table users and the comments from the table comments with this query :
SELECT users.avatar, users.user_name, comments.* FROM users, comments WHERE users.user_name = comments.sender_uname AND comments.page = '$page' ORDER BY comments.id ASC
but it returns the error :
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/path/comments.php on line 21
I’m not a mysql expert but I found several tutorials and it doesn’t seem too complicated. And still I can’t figure out what is wrong with my query.
Any help is appreciated.