sql server 2008 - Using adodb-mssqlnative.inc.php with a timeout for update without any result -
i using php5.4.38 apache2.2.29 on windows server 2008 mssql database utf8 fields chinese language.
i using adodb , affected driver adodb-mssqlnative.inc.php in adodb/drivers folder. seems using timeout connection-id update query, update not writing database. build own function show doing:
function sql_own_query($connection_id, $sql, $params) { $options=array('querytimeout' => 90); if (substr($sql, 0, 6) != 'select') { $options = array(); } if (!empty($options)) { $result = sqlsrv_query($connection_id, $sql, $params, $options); } else { $result = sqlsrv_query($connection_id, $sql, $params); } return $result; } // returns query id if successful, otherwise false function _query($sql,$inputarr) { $this->_errormsg = false; if (is_array($inputarr)) { $rez = $this->sql_own_query($this->_connectionid,$sql,$inputarr); //$rez = sqlsrv_query($this->_connectionid,$sql,$inputarr); } else if (is_array($sql)) { $rez = $this->sql_own_query($this->_connectionid,$sql[1],$inputarr); //$rez = sqlsrv_query($this->_connectionid,$sql[1],$inputarr); } else { $rez = $this->sql_own_query($this->_connectionid,$sql, array()); //$rez = sqlsrv_query($this->_connectionid,$sql, array()); } so is: checking if select statement , put $options - parameter it. if update statement go through without timeout parameter.
the problem is, querytimeout set, update query not modify table. when execute:
_query('select ...');//timeout set 90 _query('update ...');//timeout still set the update statement not have result. table same before. same result happen when enlarge timeout 300.
i tested deactivate connectionpooling described here: https://msdn.microsoft.com/en-us/library/ff628167(v=sql.105).aspx without positive result.
so question is: why update timeout conclude empty result. database not showing error, nor php , apache.
ps: due software logic, not possible disable select statement before. :)
thanks hints!
Comments
Post a Comment