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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:13:31+00:00 2026-05-23T20:13:31+00:00

Currently, the codes I’ve done below are the codes that will only display the

  • 0

Currently, the codes I’ve done below are the codes that will only display the courses that have a tutor_id assigned to them. However, what I want is to display the courses that are not assigned the tutor_id as well as ‘No tutor has been assigned to this course’. Tutor_id is a NULL variable in the database.

(storing in navigation pages)

$arrItems = executeSelectQuery("SELECT * FROM course, category, tutor WHERE course.Category_id = category.Category_id AND course.Tutor_id = tutor.Tutor_id");

$totalDesign = executeSelectQuery("SELECT * FROM course, category, tutor WHERE course.Category_id = category.Category_id AND course.Tutor_id = tutor.Tutor_id");
$numrows = count($totalDesign);

$arrItems = executeSelectQuery("SELECT * FROM course, category, tutor WHERE course.Category_id = category.Category_id AND course.Tutor_id = tutor.Tutor_id ORDER BY course.Course_name ASC LIMIT $offset, $rowsPerPage");
  • 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-05-23T20:13:33+00:00Added an answer on May 23, 2026 at 8:13 pm
    SELECT * FROM course
    INNER JOIN category ON course.Category_id = category.Category_id
    OUTER JOIN tutor ON course.Tutor_id = tutor.Tutor_id 
    ORDER BY course.Course_name ASC LIMIT $offset, $rowsPerPage
    

    Outer join provides just the functionality you are after. All
    courses will be selected with some containing null values in the
    Tutor_id field. Identify when this happens in your code and print
    “No tutor has been assigned to this course” on these occasions.

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

Sidebar

Related Questions

I currently have some code that will produce a crash dump when my application
We currently have code like this: Dim xDoc = XDocument.Load(myXMLFilePath) The only way we
I currently have some code that pulls down a list of users in a
I currently have a thread that I created using CreateRemoteThread(). Everything works great. Upon
I have currently a DNS Reverse lookup script which works however there is a
I currently have the following codes and I would like to add a new
Currently, I'm using the codes below to save a file to a directory on
I'm currently looking for a js library that can encode text in qr codes.
I currently have a Rails website that has some Prototype scripting in it. My
Currently i have tried half internet codes ( :D ) to make this work,

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.