Recently I had to work with MySQL. Wrote a line like this in php:
$ query = "SELECT 'catalog' FROM $ moduls WHERE posit = 'head'";
Upon request, it outputs:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘WHERE posit =’ head ” at line 1
Answer 1, authority 100%
the name of the table in MySQL (I’m not sure about the other databases) is taken not in single quotes, but in an apostrophe which is in Russian. And in quotes it is a string
$ query = "SELECT` catalog` FROM ". $ moduls." WHERE posit = 'head' ";
Answer 2, authority 94%
$ query = "SELECT catalog FROM". $ moduls. "WHERE posit = 'head'";