metaTablesSQL) { // complicated state saving by the need for backward compat if ($ttype == 'VIEWS'){ $sql = str_replace('U', 'V', $this->metaTablesSQL); }elseif (false === $ttype){ $sql = str_replace('U',"U' OR type='V", $this->metaTablesSQL); }else{ // TABLES OR ANY OTHER $sql = $this->metaTablesSQL; } $rs = $this->Execute($sql); if ($rs === false || !method_exists($rs, 'GetArray')){ return $false; } $arr = $rs->GetArray(); $arr2 = array(); foreach($arr as $key=>$value){ $arr2[] = trim($value['name']); } return $arr2; } return $false; } function MetaDatabases() { $arr = array(); if ($this->metaDatabasesSQL!='') { $rs = $this->Execute($this->metaDatabasesSQL); if ($rs && !$rs->EOF){ while (!$rs->EOF){ $arr[] = $rs->Fields('name'); $rs->MoveNext(); } return $arr; } } return false; } // fix a bug which prevent the metaColumns query to be executed for Sybase ASE function MetaColumns($table,$upper=false) { $false = false; if (!empty($this->metaColumnsSQL)) { $rs = $this->Execute(sprintf($this->metaColumnsSQL,$table)); if ($rs === false) return $false; $retarr = array(); while (!$rs->EOF) { $fld = new ADOFieldObject(); $fld->name = $rs->Fields('field_name'); $fld->type = $rs->Fields('type'); $fld->max_length = $rs->Fields('width'); $retarr[strtoupper($fld->name)] = $fld; $rs->MoveNext(); } $rs->Close(); return $retarr; } return $false; } function getProcedureList($schema) { return false; } function ErrorMsg() { if (!function_exists('sybase_connect')){ return 'Your PHP doesn\'t contain the Sybase connection module!'; } return parent::ErrorMsg(); } } class adorecordset_sybase_ase extends ADORecordset_sybase { var $databaseType = "sybase_ase"; function ADORecordset_sybase_ase($id,$mode=false) { $this->ADORecordSet_sybase($id,$mode); } }