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

  • Home
  • SEARCH
  • 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 8120929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:19:05+00:00 2026-06-06T05:19:05+00:00

I have UserComments table like this : 1 | Frank | hello world 2

  • 0

I have UserComments table like this :

1 | Frank | hello world
2 | Jane | Hi there
3 | Frank | this is my comments
4 | Frank | I think I need some sleep
5 | Jason | I need to buy new MacBook
6 | Jane | Please invite my new Blackberry PIN

On the other hand, I have FriendList table contains :

1 | Jason
2 | Jane

Let’s say my friends ID always BETWEEN 1 AND 5.

And since Frank is not my friend, I’m not able to see his comments. how to have combined tables like this (ORDER BY UserComments.ID DESC) :

1 | Jane | Please invite my new Blackberry PIN
2 | Jason | I need to buy new MacBook
3 | Jane | Hi there

thanks.

  • 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-06T05:19:07+00:00Added an answer on June 6, 2026 at 5:19 am

    Try this:

        SELECT A.ID, B.UserName, B.Comment 
          FROM FriendList A
    INNER JOIN UserComments B ON A.ID = B.ID
      ORDER BY A.ID DESC
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a database with a table 'Posts Table'. In this table there are
This is interesting. I have some view code that looks like this: <%= @cause.updates.each
Let's say we have a table with user comments. First-level comments have a reference
I have an sql database. In this database is 3 tables I need to
have a php code like this,going to convert it in to C#. function isValid($n){
Ok so i have this custom blog that i now need to move over
I have a table of venues, reviews and comments, where a venue has many
I have some code which retrieves user comments from my database: $comments = mysql_query(SELECT
I have an ASP.NET site which I'd like to add page-level comments to without
I have a simple one-to-many structure like this: class User(db.Model): userEmail = db.StringProperty() class

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.