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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:22:18+00:00 2026-06-13T23:22:18+00:00

Well after my first question here I came the below code which is correct

  • 0

Well after my first question here I came the below code which is correct and tested:

SELECT DISTINCT
id, title, description, expires,
creator_id,executer_id,
oc_opentask.priority_id,
oc_opentask.status_id, priority_name, status_name,
oc_user1.username AS executer_username,
oc_user2.username AS creator_username
FROM oc_opentask
INNER JOIN oc_opentask_priority 
ON oc_opentask.priority_id=oc_opentask_priority.priority_id
INNER JOIN oc_opentask_status 
ON oc_opentask.status_id=oc_opentask_status.status_id
INNER JOIN oc_user AS oc_user1 
ON oc_opentask.executer_id=oc_user1.user_id
INNER JOIN oc_user AS oc_user2 
ON oc_opentask.creator_id=oc_user2.user_id

My next question is: I want to access those executer_username and creator_username with a WHERE attribute to compare it with a value, so what I am trying which is poping mystake is:

SELECT DISTINCT
id, title, description, expires,
creator_id,executer_id,
oc_opentask.priority_id,
oc_opentask.status_id, priority_name, status_name,
oc_user1.username AS executer_username,
oc_user2.username AS creator_username
FROM oc_opentask
INNER JOIN oc_opentask_priority 
ON oc_opentask.priority_id=oc_opentask_priority.priority_id
INNER JOIN oc_opentask_status 
ON oc_opentask.status_id=oc_opentask_status.status_id
INNER JOIN oc_user AS oc_user1 
ON oc_opentask.executer_id=oc_user1.user_id
INNER JOIN oc_user AS oc_user2 
ON oc_opentask.creator_id=oc_user2.user_id
WHERE oc_opentask.creator_username='bill' 

bill does exists in db, but my command to access that value is not correct, can any1 help me on this? 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-13T23:22:18+00:00Added an answer on June 13, 2026 at 11:22 pm

    You are using wrong table to get the creator name in the where clause. Use oc_user2 table to get the user name(creator name). Also I am just thinking still there may be a case related issue and hence advice to use LOWER function before comparison and as below:

        SELECT DISTINCT
           id, title, description, expires,
           creator_id,executer_id,
           oc_opentask.priority_id,
           oc_opentask.status_id, priority_name, status_name,
           oc_user1.username AS executer_username,
           oc_user2.username AS creator_username
        FROM oc_opentask
        INNER JOIN oc_opentask_priority 
           ON oc_opentask.priority_id=oc_opentask_priority.priority_id
        INNER JOIN oc_opentask_status 
           ON oc_opentask.status_id=oc_opentask_status.status_id
        INNER JOIN oc_user AS oc_user1 
           ON oc_opentask.executer_id=oc_user1.user_id
        INNER JOIN oc_user AS oc_user2 
           ON oc_opentask.creator_id=oc_user2.user_id
        WHERE LOWER(oc_user2.username)=LOWER('bill')
    

    I just user LOWER on right side to make it case independent for any valid name irrespective of the case.

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

Sidebar

Related Questions

Aloha. This is my first question here after eons of lurking. I apologize for
this is my first question here. I have the following jquery code: $(document).ready(function(){ $(a).click(function(){
Well this is not the first time im asking these question here but I
Well looks too simple a question to be asked but i asked after going
here's a Fusion Tables map that's broken after a search. It does everything well
so here goes my first real coding question ever on the web since normally
Of course after hours of pondering this problem, the first comment on my question
Well, I'm sure this is not the first time to see this question. and
This is my first question here, but I hope I will get a lot
first time asking a question here. I'm making a DNN module and in the

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.