Mysql Php display data from 3 tables in the database

I want to display data from 3 different tables. I am having an issue with Inner Join.

I want to display results in this format:

first_name | last_name | fk_rate_code | dob 


invoice (id, customer_first_name, customer_last_name, customer_id) invoice_items (id, fk_invoice, fk_rates_code) clients (id, customer_id, dob) 

here is how the tables are linked: = invoice_items.fk_invoice) invoice.customer_id = clients.customer_id 

Here is the query i am using:

Select     invoice.customer_first_name,    invoice.customer_last_name,   invoice_items.fk_rates_code,   clients.dob  FROM invoice  INNER JOIN invoice_items ON invoice_items.fk_invoice =  INNER JOIN clients ON clients.customer_id = invoice.customer_id 

After running the query it gives me an error:

    Static analysis:  1 errors were found during analysis.  Missing expression. (near "ON" at position 25) SQL query: Edit Edit  SET FOREIGN_KEY_CHECKS = ON;  MySQL said: Documentation  #2006 - MySQL server has gone away 

Sorry in case i did not explain properly. I am still a beginner at this. Thank you in advance.