Various settings for compatibility with MSSQL
This commit is contained in:
@@ -1542,6 +1542,20 @@ class G
|
||||
return addslashes(stripslashes($sqlString));
|
||||
}
|
||||
}
|
||||
|
||||
function MySQLSintaxis()
|
||||
{
|
||||
$DBEngine = DB_ADAPTER;
|
||||
switch($DBEngine){
|
||||
case 'mysql' :
|
||||
return TRUE;
|
||||
break;
|
||||
case 'mssql' :
|
||||
default:
|
||||
return FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* Returns a sql string with @@parameters replaced with its values defined
|
||||
* in array $result using the next notation:
|
||||
* NOTATION:
|
||||
|
||||
@@ -273,7 +273,9 @@
|
||||
//now get users, just for the Search action
|
||||
$cUsers = $oAppCache->getToReassignListCriteria();
|
||||
$cUsers->addSelectColumn(AppCacheViewPeer::USR_UID);
|
||||
$cUsers->addGroupByColumn(AppCacheViewPeer::USR_UID);
|
||||
|
||||
if(g::MySQLSintaxis())
|
||||
$cUsers->addGroupByColumn(AppCacheViewPeer::USR_UID);
|
||||
|
||||
$cUsers->addAscendingOrderByColumn ( AppCacheViewPeer::APP_CURRENT_USER );
|
||||
$oDataset = AppCacheViewPeer::doSelectRS($cUsers);
|
||||
|
||||
@@ -288,10 +288,11 @@
|
||||
$Criteria->addAscendingOrderByColumn( $sort );
|
||||
}
|
||||
|
||||
//limit the results according the interface
|
||||
$Criteria->setLimit( $limit );
|
||||
$Criteria->setOffset( $start );
|
||||
|
||||
if(g::MySQLSintaxis()) {
|
||||
//limit the results according the interface
|
||||
$Criteria->setLimit( $limit );
|
||||
$Criteria->setOffset( $start );
|
||||
}
|
||||
$params = array();
|
||||
$sSql = BasePeer::createSelectSql($Criteria, $params);
|
||||
// var_dump($sSql);
|
||||
|
||||
Reference in New Issue
Block a user