You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Database/SybaseConnection.php
+35-24Lines changed: 35 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -102,7 +102,13 @@ private function compileForSelect(Builder $builder, $bindings) {
102
102
$tables = $alias['table'];
103
103
}
104
104
105
-
$queryRes = $this->getPdo()->query("select a.name, b.name AS type FROM syscolumns a noholdlock JOIN systypes b noholdlock ON a.usertype = b.usertype and object_name(a.id) = '".$tables."'");
105
+
$explicitDB = explode('..', $tables);
106
+
if(isset($explicitDB[1])){
107
+
$queryRes = $this->getPdo()->query("select b.name, c.name AS type from ".$explicitDB[0]."..sysobjects a noholdlock JOIN ".$explicitDB[0]."..syscolumns b noholdlock ON a.id = b.id JOIN ".$explicitDB[0]."..systypes c noholdlock ON b.usertype = c.usertype and a.name = '".$explicitDB[1]."'");
108
+
}else{
109
+
$queryRes = $this->getPdo()->query("select a.name, b.name AS type FROM syscolumns a noholdlock JOIN systypes b noholdlock ON a.usertype = b.usertype and object_name(a.id) = '".$tables."'");
@@ -304,10 +292,33 @@ public function select($query, $bindings = array(), $useReadPdo = true)
304
292
return$this->getPdo()->query("SELECT #tmpPaginate.*, #tmpTable.idTmp FROM #tmpTable INNER JOIN #tmpPaginate ON ".$where_primaries." WHERE #tmpTable.idTmp "
305
293
. "BETWEEN ".($offset+1) ." AND ". ($offset+$limit)
306
294
." ORDER BY #tmpTable.idTmp ASC")->fetchAll($me->getFetchMode());
0 commit comments