开发者

Determine MySql mode from PHP

开发者 https://www.devze.com 2023-04-12 18:51 出处:网络
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 scri

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.


SELECT @@sql_mode; will give what you want.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号