jeudi 6 mars 2014

mysql query to select comments from two tables


Vote count:

0




I have 2 tables. comments(comments_id, comment, user, flag) and table hide_comment(id, user, the_comment_id). Table comments holds all comments posted by users. Table hide_comment used to keep track for all posts that a user wants to hide. For example if $session_user_id=23 want to hide a comment with comments_id=1209 a have a php that places $session_user_id and comments_id into hide_comment table. In order to show in user's blog all comments except those that are hidden, I want a mysql query that it would selects all comments from table comments , except those in table hide_comment that the user denotes that wants to hide. Any idea what mysql_query should be?



asked 1 min ago






Aucun commentaire:

Enregistrer un commentaire