Correccion de dbAdapter
This commit is contained in:
@@ -697,6 +697,23 @@ class workspaceTools
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function setFormatRows()
|
||||||
|
{
|
||||||
|
switch ($this->dbAdapter) {
|
||||||
|
case 'mysql':
|
||||||
|
$this->assoc = MYSQL_ASSOC;
|
||||||
|
$this->num = MYSQL_NUM;
|
||||||
|
break;
|
||||||
|
case 'sqlsrv':
|
||||||
|
$this->assoc = SQLSRV_FETCH_ASSOC;
|
||||||
|
$this->num = SQLSRV_FETCH_NUMERIC;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new Exception("Unknown adapter hae been set for associate fetch index row format.");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Upgrade this workspace database from a schema
|
* Upgrade this workspace database from a schema
|
||||||
*
|
*
|
||||||
@@ -713,6 +730,8 @@ class workspaceTools
|
|||||||
throw new Exception("Only MySQL is supported");
|
throw new Exception("Only MySQL is supported");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->setFormatRows();
|
||||||
|
|
||||||
$workspaceSchema = $this->getSchema($rbac);
|
$workspaceSchema = $this->getSchema($rbac);
|
||||||
|
|
||||||
$oDataBase = $this->getDatabase($rbac);
|
$oDataBase = $this->getDatabase($rbac);
|
||||||
@@ -741,7 +760,7 @@ class workspaceTools
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$oDataBase->iFetchType = MYSQL_NUM;
|
$oDataBase->iFetchType = $this->num;
|
||||||
|
|
||||||
$oDataBase->logQuery(count($changes));
|
$oDataBase->logQuery(count($changes));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user