Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

CMssqlCommandBuilder code style fix #1532

Merged
merged 1 commit into from

2 participants

@creocoder

No description provided.

@cebe cebe was assigned
@cebe cebe merged commit 17069e3 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 4, 2012
  1. @creocoder

    Code style fix

    creocoder authored
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 framework/db/schema/mssql/CMssqlCommandBuilder.php
View
4 framework/db/schema/mssql/CMssqlCommandBuilder.php
@@ -178,8 +178,8 @@ public function createUpdateCounterCommand($table,$counters,$criteria)
*/
public function applyLimit($sql, $limit, $offset)
{
- $limit = $limit!==null ? intval($limit) : -1;
- $offset = $offset!==null ? intval($offset) : -1;
+ $limit = $limit!==null ? (int)$limit : -1;
+ $offset = $offset!==null ? (int)$offset : -1;
if ($limit > 0 && $offset <= 0) //just limit
$sql = preg_replace('/^([\s(])*SELECT( DISTINCT)?(?!\s*TOP\s*\()/i',"\\1SELECT\\2 TOP $limit", $sql);
elseif($limit > 0 && $offset > 0)
Something went wrong with that request. Please try again.