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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T19:15:18+00:00 2026-05-10T19:15:18+00:00

My table structure looks like this: tbl.users tbl.issues +——–+———–+ +———+————+———–+ | userid | real_name

  • 0

My table structure looks like this:

      tbl.users                       tbl.issues +--------+-----------+   +---------+------------+-----------+ | userid | real_name |   | issueid | assignedid | creatorid | +--------+-----------+   +---------+------------+-----------+ |   1    |   test_1  |   |    1    |     1      |     1     | |   2    |   test_2  |   |    2    |     1      |     2     | +--------+-----------+   +---------+------------+-----------+ 

Basically I want to write a query that will end in a results table looking like this:

                           (results table) +---------+------------+---------------+-----------+--------------+ | issueid | assignedid | assigned_name | creatorid | creator_name | +---------+------------+---------------+-----------+--------------+ |    1    |     1      |    test_1     |    1      |    test_1    | |    2    |     1      |    test_1     |    2      |    test_2    | +---------+------------+---------------+-----------+--------------+ 

My SQL looks like this at the moment:

SELECT    `issues`.`issueid`,   `issues`.`creatorid`,   `issues`.`assignedid`,   `users`.`real_name` FROM `issues` JOIN `users`    ON ( `users`.`userid` = `issues`.`creatorid` )   OR (`users`.`userid` = `issues`.`assignedid`) ORDER BY `issueid` ASC LIMIT 0 , 30  

This returns something like this:

                (results table) +---------+------------+-----------+-----------+ | issueid | assignedid | creatorid | real_name | +---------+------------+-----------+-----------+ |    1    |     1      |     1     |   test_1  | |    2    |     1      |     2     |   test_1  | |    2    |     1      |     2     |   test_2  | +---------+------------+-----------+-----------+ 

Can anyone help me get to the desired results table?

  • 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. 2026-05-10T19:15:18+00:00Added an answer on May 10, 2026 at 7:15 pm
    SELECT    IssueID,    AssignedID,    CreatorID,    AssignedUser.real_name AS AssignedName,    CreatorUser.real_name AS CreatorName FROM Issues   LEFT JOIN Users AS AssignedUser          ON Issues.AssignedID = AssignedUser.UserID   LEFT JOIN Users AS CreatorUser          ON Issues.CreatorID = CreatorUser.UserID ORDER BY `issueid` ASC LIMIT 0, 30 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My Table structure looks like this... | 2010-01-28 10:00:01 | Delhi | Application |
Let's say my table structure looks something like this: CREATE TABLE [dbo].[table1] ( [id]
I have a bag whose structure looks like this: <bag name=foo fetch=select table=table_of_foos> <key
I have a table structure that looks like: <table> <tr id=row1> <td> <div>row 1
Given a table structure like this: CREATE TABLE `user` ( `id` int(10) unsigned NOT
This is the MySQL table structure that I have: itemID (BIGINT) userID (BIGINT) wasAdded
I've got three tables; Auctions, Auction Bids and Users. The table structure looks something
I don't know how to query this one out. I have a table structure
I'm trying to create a page which looks somewhat like this: http://www.drmichaelbogdan.com/plastic-surgery/ (I'm referring
I have data in my database that looks like this: Date (DateTime) Type (varchar)

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.