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
$indentity = $this->getPdo()->query("select name as 'column' from syscolumns where status & 128 = 128 AND object_name(id)='".$from."'")->fetchAll($me->getFetchMode())[0];
274
-
275
-
if(count($indentity) == 0){
273
+
$explicitDB = explode('..', $from);
274
+
if(isset($explicitDB[1])){
275
+
$identity = $this->getPdo()->query("select b.name as 'column' from ".$explicitDB[0]."..syscolumns AS b INNER JOIN ".$explicitDB[0]."..sysobjects AS a ON a.id = b.id WHERE status & 128 = 128 AND a.name ='".$explicitDB[1]."'")->fetchAll($me->getFetchMode())[0];
276
+
}else{
277
+
$identity = $this->getPdo()->query("select name as 'column' from syscolumns where status & 128 = 128 AND object_name(id)='".$from."'")->fetchAll($me->getFetchMode())[0];
278
+
}
279
+
if(count($identity) == 0){
276
280
$primaries = $this->getPdo()->query("SELECT index_col(object_name(i.id), i.indid, c.colid) AS primary_key FROM sysindexes i, syscolumns c WHERE i.id = c.id AND c.colid <= i.keycnt AND i.id = object_id('".$from."')")->fetchAll($me->getFetchMode());
277
281
foreach($primariesas$primary)
278
282
{
@@ -282,8 +286,8 @@ public function compileOffset($me){
282
286
$res_primaries = implode(', ',$new_arr);
283
287
$where_primaries = implode(' AND ',$where_arr);
284
288
}else{
285
-
$res_primaries = $indentity->column.'+0 AS '.$indentity->column;
0 commit comments