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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:45:05+00:00 2026-06-15T14:45:05+00:00

I think the title is quite straightforward but basically I have 2 mysql tables

  • 0

I think the title is quite straightforward but basically I have 2 mysql tables that hold various information. Linking them together is a unique id.

One of the tables is showing a total of 2 rows less than the other. I would like to run through these rows and find out which id values are missing. I do not know enough of mysql to say that this is not possible using only mysql but i thought it would be an easier task with php.

so something like this which really is a thumbsuck :

if ($stmt = $link->prepare("
    SELECT i.id AS itemsId, c.item_id AS catsId
    FROM items i
    INNER JOIN item_categories c
    WHERE i.id = c.item_id
"))
{
    $stmt->execute();
    $stmt->bind_result($id1, $id2);
    $stmt->close();
}
while ($stmt->fetch())
{
    *run through the numbers and echo which numbers are missing out of 1 to 300.*
}

Would anyone have any idea on how i could accomplish something like this?

Any advice, suggestion or information would be greatly appreciated, thank you!

  • 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-15T14:45:06+00:00Added an answer on June 15, 2026 at 2:45 pm
    SELECT id FROM items WHERE id NOT IN (SELECT item_id FROM item_categories);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a MySQL question that I think must be quite easy. I need
Well, I suppose that the title explains it quite well. But I think I'd
OK, I don't think the title says it right... but here goes: I have
Not a great title but I'm looking more for some guidance, have searched quite
Maybe an over elaborate title. Basically think of an email inbox. I have a
I think the title is fairly self explanatory, but to give a little context.
The title says enough I think. I have a full quality BufferedImage and I
i think my whole questions is inside title bar =] but i'll explain little
The title of this question may be a bit misleading. I couldn't quite think
I think this should be quite simple, but I just can't get it to

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.