Is there any way to find if mysql server is in strict mode or not from PHP? I need to find out this at runtime(in installation script), so I can inform user if his system satisfy script requirements.
Asked
Active
Viewed 3,029 times
3
-
I'm not quite sure whether it's completely the same but you might want to have a look at [$MySQLi_Driver->$report_mode](http://ch2.php.net/manual/en/class.mysqli-driver.php#mysqli-driver.props.report-mode). – str Oct 14 '11 at 06:51
2 Answers
3
I think you can run a simple query like
SELECT @@sql_mode;
This should be able to get you your SQL mode. There is more information at http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html about how you can manage the mode if need be.

aayush sharma
- 187
- 9