hi all,
when I execute update statement, I found that the connection->Affected_Rows() can not return correct answer.
I traced into the _query method, and found that the method will return true, if the sql statement is not start with SELECT.
so, when execute update statement, the _query method will return true, not the resource for the query.
but the Affected_Rows() will use the resource the get the count of the afftected rows.
so Affected_Rows() return the wrong answer.
now, I delete the following code Temporarily in the _query method.
//fix for returning true on anything besides select statements
if (is_array($sql)) $sql = $sql[1];
$sql = ltrim($sql);
if(stripos($sql, 'SELECT') !== 0 && $rez !== false)
{
if ($this->debug) error_log(" isn't a select query, returning boolean true");
return true;
}
//end fix
we expect new release version will fix this bug.
by the way, I use mssqlnative.