picodb(mssql): teach picodb to use TOP for limits on MSSQL
This commit is contained in:
committed by
Frédéric Guillot
parent
5493c2997e
commit
37bc859df5
@@ -30,6 +30,14 @@ abstract class Base
|
||||
*/
|
||||
protected $pdo = null;
|
||||
|
||||
/**
|
||||
* use TOP or LIMIT for returning a subset of rows
|
||||
*
|
||||
* @access public
|
||||
* @var bool
|
||||
*/
|
||||
public bool $useTop;
|
||||
|
||||
/**
|
||||
* Create a new PDO connection
|
||||
*
|
||||
@@ -128,6 +136,7 @@ abstract class Base
|
||||
|
||||
$this->createConnection($settings);
|
||||
$this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
$this->useTop = false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -231,4 +240,5 @@ abstract class Base
|
||||
{
|
||||
return $this->getConnection()->query('SELECT VERSION()')->fetchColumn();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user