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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:49:24+00:00 2026-06-01T21:49:24+00:00

I am now having a problem sorting the data in my PHP page where

  • 0

I am now having a problem sorting the data in my PHP page where the data displayed is combined of two tables as the both tables are linked by a foreign key in one of the table.

two tables are as below

Table name: Students

stu_id
stu_name
.
.
.
stu_course_id


Table name: courses

course_id
course_name

Wen displaying the data it is displayed in following format:

Student id | Student name | student course
—-1 ————–john————-engineering
—-2————–dave—————business

I am able to sort the data by name which is pretty easy but I am having difficulty sorting the data by course name. Is this possible as the course name is not in the same table as student?

  • 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-01T21:49:26+00:00Added an answer on June 1, 2026 at 9:49 pm
    select s.stu_id, s.stu_name, c.course_name
    from students s
    inner join courses c on s.stu_course_id = c.course_id
    order by c.course_name asc
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a problem right now with a function we're using in PHP to
Having problem in displaying relational properties b/w two tables having one(company) to many(package_master) relationship
We are having this problem with a controller right now; the controller looks like
I've been going at this problem for a solid couple hours now and having
I've already looked around but couldn't find the exact solution/problem I'm having right now.
I'm having (many, but for now,) one problem with a project I'm working on.
I added the authlogic_facebook_connect plugin to my project and I'm now having problem running
Hello i am just Studying 3-tier Application. I am now having a problem with
I know that many people have had this problem... but I am now having
I have used GetShortPathName frequently with no problem. However, now I'm having a problem.

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.