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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:08:22+00:00 2026-05-31T11:08:22+00:00

I am having a problem writing a MySQL query to get data from 2

  • 0

I am having a problem writing a MySQL query to get data from 2 tables in the same database. I don’t know how to combine the 2 tables into 1 table basically so that I can use PHP to display the information. Right now I am using 2 queries and PHP to join them… I really need the persons name and the score they got.

tbl_scores
----------
user_id
points

tbl_users
---------
user_id
name

tbl_users has more fields but those are the only ones that matter I think? Please help or send what I need to look up to learn more.

  • 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-31T11:08:23+00:00Added an answer on May 31, 2026 at 11:08 am

    The word you’re looking to use is JOIN… more information on MySQL JOINs can be found all over the internet but I found one here: http://mysqljoin.com/

    The following code is untested but should work for your scenario…

    SELECT
        u.name,
        s.points
    FROM
        tbl_users AS u LEFT JOIN tbl_scores AS s ON u.user_id = s.user_id
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing an iPhone app which gets data from a mysql database. I
I am having problem with $_GET array. More precisely I'm retrieving data from mysql
I'm having a problem writing Norwegian characters into an XML file using C#. I
Here's a real noobish MySQL query problem I'm having. I have a high score
I am having a problem in writing the query for this. I have a
I'm having a problem writing to a file: FileInputStream fin; try { fin =
I'm having a problem with getting a Ruby string substitution going. I'm writing a
The problem I'm having with writing a web application architecture is that I want
Hi I am having no problem writing to or appending to a file, the
I'm having a problem writing a regular expression for matching HTML tags. I found

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.