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 7779105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:33:59+00:00 2026-06-01T18:33:59+00:00

Hi hope someone can advise I have a sql query that went it runs

  • 0

Hi hope someone can advise

I have a sql query that went it runs it repeats the same result by the number of users (entries) made

for example:

post_id
20
20
19
19
18
18

Here is the query it takes no arguments, could someone explain why this is happening please?

Thanks

SELECT DISTINCT post_look.post_id, post_look.look_id, post_look.date_posted,     looks.title, looks.item_id, user.user_id, user.first_name, user.last_name,    user_account.profile_image, user_account.account_status, add_profile_images.image_name
FROM post_look
JOIN looks ON looks.look_id = post_look.look_id
JOIN add_look_item ON add_look_item.look_id = looks.look_id
JOIN item ON item.item_id = add_look_item.item_id
JOIN add_images ON add_images.item_id = item.item_id
JOIN user_item ON user_item.item_id = item.item_id
JOIN user_account ON user_account.account_id = user_item.account_id
JOIN user ON user.user_id = user_account.user_id
JOIN users_profile_images ON users_profile_images.account_id = user_account.account_id
JOIN add_profile_images ON add_profile_images.image_id = users_profile_images.image_id
ORDER BY post_look.post_id DESC 
LIMIT 0 , 30
  • 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-01T18:34:01+00:00Added an answer on June 1, 2026 at 6:34 pm
    SELECT DISTINCT c1, c2, c3
    

    means that {c1, c2, c3} will be distinct.

    You should consider adding GROUP BY post_look.post_id to your query.

    See the difference here:

    • DISTINCT
    • GROUP BY
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hope someone can help. I have two tables: Users -UserID -UserName UsersType -UserTypeID -UserID
Really hope someone can help me as I'm a bit stuck :S I have
Hope someone can help me with this.. I have a magento store up&running, via
I really hope someone can advise on displaying a google map from a hidden
Hope someone can advice but looking for an API service that can provide traveling
I have a forum, where users can subscribe to a particular thread. When someone
Hope someone can help me I have declared the variable <?php $sitename = http://
I’m struggling a little bit with some XAML syntax I hope someone can advise
I hope someone can help with this issue. I have a popup iframe using
Hope someone can advise. Having issues trying to remove a row once a link

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.