"!=" is not SQL compliant.
The "LIMIT $offset, $limit" syntax is only supported by MySQL and MariaDB.
The code used to operate under the assumption that MariaDB doesn't support quoting identifiers. Not only is that not exactly true, but MariaDB has reserved keywords that cannot be used as table or column names unquoted.