Hello, I am posting a question because there was a problem with mySQL query.
select ID,membername,SubID from fund_member where SubID='SP107' ;
When you search in , you will get the following results.
1 row in set, 1 warning (0.00 sec)
I searched for SubID with SP107, but it came out with the result of 0 so I checked the warning
A warning like this occurred, and when I checked the table structure, SubID was a numeric type, not a letter
It was a field. Because MySQL automatically transformed this problem.
It is judged to be a case that occurred, but MySQL does not convert to automatic type and does not warn you
Is there an option to spray errors?
mysql
They say that you can set the SQL in strict mode.
set @@GLOBAL.sql_mode = "STRICT_ALL_TABLES";
set @@SESSION.sql_mode = "STRICT_ALL_TABLES";
Or
SET sql_mode = '';
Please change the setting to .
A detailed description of Strict mode is available in Server SQL Modes - Strict.
© 2024 OneMinuteCode. All rights reserved.