Syntax for inner join query

I’m trying to fetch data from the database and iterate through loadrecordset, but I’m having trouble writing the request correctly. I formalized it in the custom view SQL Builder, and after adjusting for a query using the loadrecordset, I still don’t get the result, it returns false
Here is my query

SELECT `id`, `file`, `words.phrase` , `words.type` AS `w_type`, `gallery.type` AS `g_type`
FROM gallery INNER JOIN
  words ON `id` = `content_id`
WHERE `w_type` = 'covid_tag' AND `g_type` = 'teacher_doc'

You may see MySQL docs Identifier Qualifiers:
If any components of a multiple-part name require quoting, quote them individually rather than quoting the name as a whole. For example, write my-table.my-column, not my-table.my-column.