Skip to content
Advertisement

Where is my syntax error in this SQL request?

I’m getting a syntax error near WHERE tbkay.keyword = 'ipsum' in the following request (using phpmyadmin):


My tables

I don’t get it.

Advertisement

Answer

You are not using an ON clause after each join:

I also changed the joins to INNER joins because the WHERE clause returns only matching rows.

If you want to keep the LEFT join and return all the rows of articles you must move this condition to the ON clause:

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement