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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:37:57+00:00 2026-05-25T14:37:57+00:00

I have a mysql query that looks like this: $query = SELECT * FROM

  • 0

I have a mysql query that looks like this:

$query = "SELECT * FROM users
          JOIN signup ON users.uid = signup.uid
          JOIN jobs ON users.category_id = jobs.id
          JOIN lclasses ON users.class = lclasses.class_id
          JOIN degrees ON users.degree_id = degrees.degree_id
          JOIN trades ON users.trade_id = trades.trade_id
          JOIN tradestatuses ON users.trade_status = tradestatuses.status_id
          WHERE users.uid='{$id}' LIMIT 1";

If $id = 8, then my query returns properly. If I try any other id that’s in my database, I get an empty result set.

I tested the query in phpMyAdmin and get the same result. No errors in the query when I use the different numbers, just an empty result set yet I can look at the row right in the Browse section. Is my table corrupted? Anybody had anything like that ever happen to them?

  • 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-25T14:37:58+00:00Added an answer on May 25, 2026 at 2:37 pm

    An empty result set is an empty result set.

    Since they are all INNER JOINS, any one of the joins could be “linking to nothing” (and thus resulting an empty result set). It is impossible to say more without careful inspection of the data. I would consider breaking the query down into parts to see which part “doesn’t work”.

    Happy coding.


    Helpful advice from mu’s post comment:

    Change your JOINs to LEFT JOINs and look for unexpected NULLs in the output.

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

Sidebar

Related Questions

I have a connection class for MySQL that looks like this: class MySQLConnect {
I have a mysql table that looks something like this: Row 1: 'visitor_input_id' =>
I have a MySQL query that I use to retrieve random rows from a
I have a mysql db query that I'd like to take and condense into
I have an application that executes the following MySQL query: SELECT 402 AS user_id,
I have a table that looks like this: (so you can picture it visually)
I have a php script that runs a mysql query, then loops the result,
I have a MySQL query that returns a result with a single column of
I have a mysql query that targets a single column in a single row
I'm running an MySQL query that returns results based on location. However I have

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.