From: <dai...@us...> - 2010-12-27 07:30:24
|
Revision: 4452 http://web-erp.svn.sourceforge.net/web-erp/?rev=4452&view=rev Author: daintree Date: 2010-12-27 07:30:17 +0000 (Mon, 27 Dec 2010) Log Message: ----------- SET FOREIGN_KEY_CHECKS option in DB_query Modified Paths: -------------- trunk/includes/ConnectDB_mysql.inc Modified: trunk/includes/ConnectDB_mysql.inc =================================================================== --- trunk/includes/ConnectDB_mysql.inc 2010-12-27 04:58:50 UTC (rev 4451) +++ trunk/includes/ConnectDB_mysql.inc 2010-12-27 07:30:17 UTC (rev 4452) @@ -53,11 +53,14 @@ $ErrorMessage='', $DebugMessage= '', $Transaction=false, - $TrapErrors=true){ + $TrapErrors=true, + $IgnoreForeignKeys=false){ global $debug; global $PathPrefix; - + if ($IgnoreForeignKeys) { + $SQL = 'SET FOREIGN_KEY_CHECKS=0; ' . $SQL . ' SET FOREIGN_KEY_CHECKS=1;'; + } $result=mysql_query($SQL,$Conn); $_SESSION['LastInsertId'] = mysql_insert_id($Conn); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |