Our company has a pretty old app built on php 5.6 and mysql. We recently decided to make some changes and change where its hosted. Though migration process with a tad bit of a pain, it went well for the most part.
The new host provider uses MariaDB instead of MySQL. The entire app works fine, except one part. This part is basically access profile data from the database. It gives the following error when we click on 'My Profile' -
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'offset asc, gmt asc' at line 1.
We don't know what version of MariaDB is needed because there's no way to tell. Everything worked fine when we were using MySQL.
Any feedback would be greatly appreciated. TIA.
We are not sure where to begin because the php code doesn't list any reference to MariaDB version.
I strongly suspect (because the syntax has
asc) you have a column name called "offset". MariaDB added offset as a keyword in MariaDB 10.6.What this means is the keyword needs to be quoted in the sql with backticks
`.Look for the word "offset" in your codebase and in the php code running SQL, that has
offset asc, gmt ascchange this to`offset` asc, gmt asc. There may be other uses of the word "offset" that also need quoting.