Subject: | Table column names may confict with sql key words |
We used the column name "group" for our group column.
However MySQL can not run the query because "group" is a sql key word.
Adding backticks around the column names protects them from this error.
Current SQL (near line 943, but really any sql column names should be
quoted):
SELECT $c{'DBI_GroupUserField'}
FROM $c{'DBI_GroupsTable'}
WHERE $c{'DBI_GroupField'} = ?
AND $c{'DBI_GroupUserField'} = ?
Safer written as:
SELECT $c{'DBI_GroupUserField'}
FROM $c{'DBI_GroupsTable'}
WHERE `$c{'DBI_GroupField'}` = ?
AND `$c{'DBI_GroupUserField'}` = ?
This fixed the error for me.