johnnyk Posted June 24, 2006 Share Posted June 24, 2006 I'm having trouble setting and retreiving the MySQL mode. Based on what I read at mysql.org, this is what I wrote:[code]<?phpmysql_connect(blah blah blah);mysql_select_db(blah blah blah);mysql_query("SET GLOBAL sql_mode='strict_all_tables'");$result = mysql_query("SELECT @@global.sql_mode;"); //also tried without semicolon, no difference$row = mysql_fetch_array($result);print_r($row);?>[/code]I'm getting "Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in page.html"Also, what is the difference between GLOBAL and SESSION. If I'm gonna be setting the mode after each connect, which one should I go with? Or does global eliminate the need to set the mode after every connect?Any help would be appreciated. Thanks much. Quote Link to comment https://forums.phpfreaks.com/topic/12787-mysql-mode/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.