/** * FIXME: Maybe a better way to do it */ public function foreignKeyChecksOff() { self::$utils = new Utils($GLOBALS['mysql_host'], $GLOBALS['mysql_port'], $GLOBALS['mysql_user'], $GLOBALS['mysql_pass']); $dbName = self::getDBName(); $query = "USE {$dbName};" . "SET foreign_key_checks = 1"; if (self::$utils->do_query($query) === FALSE) { // fail happens echo 'Cannot set foreign_key_checks = 0'; exit(1); } return TRUE; }
/** * FIXME: Maybe a better way to do it */ function foreignKeyChecksOff() { self::$utils = new Utils($GLOBALS['mysql_host'], $GLOBALS['mysql_user'], $GLOBALS['mysql_pass']); $query = "USE civicrm_tests_dev;" . "SET foreign_key_checks = 1"; if (self::$utils->do_query($query) === false) { // fail happens echo 'Cannot set foreign_key_checks = 0'; exit(1); } return true; }