Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8337659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:21:51+00:00 2026-06-09T04:21:51+00:00

I have a very big problem with my website. I have a form, more

  • 0

I have a very big problem with my website. I have a form, more like a text box used in submitting comments, that not the problem. The problem is displaying the comments. I want to display comments based on the friends a user added like the way facebook, twitter does.

I have 3 tables:photo_tb, comment_tb, friendship_tb.

The friendship_tb contains columns name, friend. name stores your email and friend stores the email of the person you add….

I need the photo_tb to get the picture of the person making the comment and I use a mysql join successfully.

In my comment_tb…i get the email of the person making the comment in my commentname column and comment made by the person…

I want to to show comment by ffriendship like if Mr A adds Mr B and Mr c..when Mr A logs on he should only get comments by both Mr B and Mr c and his comments doe not comments from Mr G or H.

This is what i have so far

SELECT
     comment_tb.comment_id
   , comment_tb.comname
   , comment_tb.comment
   , comment_tb.time
   , photo_tb.name
   , photo_tb.photo
   , friendship.name
   , friendship.member
FROM comment_tb, photo_tb, friendship
WHERE
        comment_tb.comname=photo_tb.name
    and friendship.name = colname

The colname is a variable for MM_Username ,the session variable when you log in is meant to display comments related to you.

The sql statement attaches the picture to each comment name successfully but doesn’t limit the comment to friends added.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T04:21:52+00:00Added an answer on June 9, 2026 at 4:21 am

    Add and friendship.member = comment_tb.comname.

    BTW, it would be nice if the column names in your SQL matches what you said in the description. I’m just guessing that friendship.member is what you called friend in the text.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have got very big problem because I would like to get more information
I have a very big problem. I am making a CRM (Costumer Relationship Management)
I have a big problem with very simple code. I need to get a
I have a very big constant array that is initialized at compile time. typedef
I have a very big problem and can't seem to find anybody else on
I have a very big problem solving this issue I have 2 tables first
I have a real big problem that normally doesn't happen. For some reason on
I have a huge plain text document, about 700kb which is very big for
I have very big problem in my SQL query and i don't know how
I have imported a very big java project from CVS . The problem is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.