HOR-4622
This commit is contained in:
@@ -471,26 +471,21 @@ abstract class ArrayBasePeer
|
|||||||
public static function doSelect(Criteria $criteria, $tableName, $con = null)
|
public static function doSelect(Criteria $criteria, $tableName, $con = null)
|
||||||
{
|
{
|
||||||
$dbMap = Propel::getDatabaseMap($criteria->getDbName());
|
$dbMap = Propel::getDatabaseMap($criteria->getDbName());
|
||||||
|
|
||||||
$stmt = null;
|
$stmt = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$params = array();
|
$params = array();
|
||||||
$sql = self::createSelectSql($criteria, $tableName, $params);
|
$sql = self::createSelectSql($criteria, $tableName, $params);
|
||||||
$sql['params'] = $params;
|
$sql['params'] = $params;
|
||||||
$stmt = $con->prepareStatement($sql);
|
$stmt = $con->prepareStatement($sql);
|
||||||
//$stmt->setLimit($criteria->getLimit());
|
$sql['limit'] = (int) $criteria->getLimit();
|
||||||
$sql['limit'] = $criteria->getLimit();
|
$sql['offset'] = (int) $criteria->getOffset();
|
||||||
//$stmt->setOffset($criteria->getOffset());
|
|
||||||
$sql['offset'] = $criteria->getOffset();
|
|
||||||
//$rs = $stmt->executeQuery(ResultSet::FETCHMODE_NUM);
|
|
||||||
$rs = $con->executeQuery($sql, ResultSet::FETCHMODE_NUM);
|
$rs = $con->executeQuery($sql, ResultSet::FETCHMODE_NUM);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
if ($stmt)
|
if ($stmt) {
|
||||||
$stmt->close();
|
$stmt->close();
|
||||||
|
}
|
||||||
throw new PropelException($e);
|
throw new PropelException($e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $rs;
|
return $rs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user