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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:18:03+00:00 2026-05-29T11:18:03+00:00

I have a problem with a mysql join i’m trying to complete. This is

  • 0

I have a problem with a mysql join i’m trying to complete.
This is my code:

SELECT title, books.`author_id`, books.`publisher_id`, books.`format_id`, books.`genre_id`, pages, isbn, description, DATE_FORMAT(release_date, '%M, %d, %Y') 
FROM `books`
INNER JOIN `authors` ON (`authors`.`author_id`= `books`.`author_id`)
INNER JOIN `publishers` ON (`publishers`.`publisher_id`= `books`.`publisher_id`)
INNER JOIN `formats` ON (`formats`.`format_id`= `books`.`format_id`)
INNER JOIN `genres` ON (`genres`.`genre_id`= `books`.`genre_id`)`

authors, publishers, formats and genres are all separate tables each with two columns. author_id and author in the case of the authors table, and the same format for the others.

The join doesn’t seem to work no matter what i do, please help me to see where i’ve gone wrong.

  • 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-29T11:18:03+00:00Added an answer on May 29, 2026 at 11:18 am

    The problem is in the select part of your query.

    SELECT title, books.`author_id`, books.`publisher_id`, books.`format_id`, books.`genre_id`
    

    You are selecting the author_id, publisher_id, format_id and genre_id from the books table, and nothing from the joined tables, so it is no wonder that you are missing the values you want.

    SELECT title, books.`author_id`, authors.`author`, books.`publisher_id`, publishers.`publisher`, books.`format_id`, formats.`format`, books.`genre_id`, genres.`genre`
    

    This will produce the values you want in addition to the id values.

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

Sidebar

Related Questions

I have a MySQL Left Join problem. I have three tables which I'm trying
I have a mysql problem, my query looks as follows but not complete SELECT
I have got a native join sub query problem in MySQL Entity. SQL code
I have a problem with FULL JOIN keyword used in MySQL SELECT Name,Surname,Notes.Payment FROM
I have a complex MySQL problem. SELECT * FROM banners, content_id_country, languages WHERE content_id_country.content_id
I have a problem with a MySQL statement: select sum(x) as sum, 01.06.2010 as
I have a problem with a SQL statement: Using this select a.id as ID,
I have a little problem, have the following statement in mysql: SELECT cmfilm.*, cmgenre.titel
I have a mysql problem. I have two tables like this that I need
I have some problem converting a MYSQL query to CI syntax. This my MySQL

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.