mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 08:05:53 +02:00
MINOR Fixed PHP notices in MSSQLDatabase
This commit is contained in:
parent
b219062d4d
commit
cf26621d57
@ -542,10 +542,10 @@ class MSSQLDatabase extends Database {
|
|||||||
*/
|
*/
|
||||||
public function indexList($table) {
|
public function indexList($table) {
|
||||||
$indexes=DB::query("EXEC sp_helpindex '$table';");
|
$indexes=DB::query("EXEC sp_helpindex '$table';");
|
||||||
|
$prefix = null;
|
||||||
|
|
||||||
foreach($indexes as $index) {
|
foreach($indexes as $index) {
|
||||||
|
|
||||||
//Check for uniques:
|
//Check for uniques:
|
||||||
if(strpos($index['index_description'], 'unique')!==false)
|
if(strpos($index['index_description'], 'unique')!==false)
|
||||||
$prefix='unique ';
|
$prefix='unique ';
|
||||||
@ -866,6 +866,7 @@ class MSSQLDatabase extends Database {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$text='';
|
$text='';
|
||||||
|
$limitText='';
|
||||||
if($sqlQuery->limit) {
|
if($sqlQuery->limit) {
|
||||||
$text='SELECT * FROM ( SELECT ROW_NUMBER() OVER (';
|
$text='SELECT * FROM ( SELECT ROW_NUMBER() OVER (';
|
||||||
$limitText=' ORDER BY ' . $sqlQuery->orderby . ') AS Number,';
|
$limitText=' ORDER BY ' . $sqlQuery->orderby . ') AS Number,';
|
||||||
|
Loading…
Reference in New Issue
Block a user