wonky1;11020881 wrote:The only thing I updated is phpmyadmin
Then you must have at least changed something else. phpMyAdmin is just a GUI tool used to manage a MySQL database; it alone has absolutely no direct impact on the operation of the MySQL server or the interaction between it and any other application/scripts/etc. (unless, of course, you for some reason wrote an application that hijacked some of phpMyAdmin's files).
wonky1;11020881 wrote:I'm not sure then, if it's a mysql error or phpmyadmin.
Hopefully it's clear now that it doesn't make sense for it to be the latter.
wonky1;11020881 wrote:I have had to edit their code before such as 'type=myisam to engine=myisam' to make it... work
Sounds like their code is crap and shouldn't be used. 😉
wonky1;11020881 wrote:Here is the code I believe you mean;
The failing query doesn't appear to be based on any part of the code you posted there. This should be obvious; the MySQL error message tells you that it realized you had a syntax error in the query when it encountered:
WHERE `client_id` = 2 ORDER BY `msg_time` DESC LIMIT 0, 50
Thus, it should follow that the code of interest should look like it will generate a SQL query that contains exactly that. I only see two MySQL queries being created in that code snippet, neither of which look similar to the part referenced in the error message.
Additionally, what I do see is some severely outdated code with some large security holes in it. For example, it: uses the 'mysql' PHP extension, depends on magic quotes, uses [man]addslashes/man to sanitize data for a SQL query, doesn't sanitize data appropriately (numeric data should be treated differently than string data, for example), uses the "or die()" method (e.g. pretty much the worst possible way you could handle an error condition other than not at all), ... I'll stop there.