Part of this question I want to solve here: What is the maximum length of the error message (or warning) after the execution of the request?
This is the third field Message .
mysql> select capid from cap where (seklect bla); ERROR 1064 (42000): 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 'bla)' at line 1 mysql> show warnings; +-------+------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | Level | Code | Message | +-------+------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | Error | 1064 | 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 'bla)' at line 1 | +-------+------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.01 sec) mysql> I found out experimentally that such a request:
$q = 'update usopt set usname=? set usplace=? set usadlog=? set uslife=? set showfr=? set sendpm=? where uid_usopt=?'; gives this error (it is NOT cropped! screenshot in confirmation)
The fact that I wanted to do an update is not the first time for me. And I constantly confuse OR AND, and then for half an hour or half a day I cannot understand why the code does not work as it should.
But it gives such a function.
echo (mysqli_error($ddb)); At the same time, such a request is made in the console:
ERROR 1064 (42000): 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 '? set usplace=? set usadlog=? set uslife=? set showfr=? set sendpm=? where uid_u' at line 1 And show warnings gives this:
mysql> show warnings; +-------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Level | Code | Message | +-------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Error | 1064 | 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 '? set usplace=? set usadlog=? set uslife=? set showfr=? set sendpm=? where uid_u' at line 1 | +-------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec) I think that 226 is the maximum of characters in the description of the error.
The question has not yet been completely resolved, but the solution is close. There was an assumption that there is some parameter that affects the length of the message, but they wrote below that it is not.