Sunday, June 30, 2013

Codeigniter sqlsrv_driver.php (affected_rows) (fix)

Fix update untuk "affected_rows".
Edit file "/system/database/drivers/sqlsrv/sqlsrv_driver.php", cari function dibawah ini :
function _execute($sql)
{
$sql = $this->_prep_query($sql);
if(stripos($sql,'UPDATE') !== FALSE) {
return sqlsrv_query($this->conn_id, $sql, null, array());
}  
return sqlsrv_query($this->conn_id, $sql, null, array(
'Scrollable' => SQLSRV_CURSOR_STATIC,
'SendStreamParamsAtExec' => true
));
}

function affected_rows()
{
// return @sqlrv_rows_affected($this->conn_id); //{BUG} : RETURN WHITE BLANK SCREEN ERROR !
return sqlsrv_rows_affected($this->result_id);
}

1 comment:

  1. Blackjack, Slots & Table Games - JC Tourism
    Book the 세종특별자치 출장안마 hotel, enjoy the best of casino gaming & slots at JC's Blackjack & Table 안양 출장샵 Games & get 전라남도 출장안마 in 태백 출장마사지 the game & enjoy dining at the hotel's restaurants. 서산 출장마사지

    ReplyDelete