• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ADORecordSet_odbc类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中ADORecordSet_odbc的典型用法代码示例。如果您正苦于以下问题:PHP ADORecordSet_odbc类的具体用法?PHP ADORecordSet_odbc怎么用?PHP ADORecordSet_odbc使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了ADORecordSet_odbc类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: odbc_tables

 function &MetaTables()
 {
     $qid = odbc_tables($this->_connectionID);
     $rs = new ADORecordSet_odbc($qid);
     //print_r($rs);
     $arr =& $rs->GetArray();
     $arr2 = array();
     for ($i = 0; $i < sizeof($arr); $i++) {
         if ($arr[$i][2] && substr($arr[$i][2], 0, 4) != 'MSys') {
             $arr2[] = $arr[$i][2];
         }
     }
     return $arr2;
 }
开发者ID:qoire,项目名称:portal,代码行数:14,代码来源:adodb-access.inc.php


示例2: odbc_tables

 function &MetaTables()
 {
     global $ADODB_FETCH_MODE;
     $savem = $ADODB_FETCH_MODE;
     $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
     $qid = odbc_tables($this->_connectionID);
     $rs = new ADORecordSet_odbc($qid);
     $ADODB_FETCH_MODE = $savem;
     if (!$rs) {
         return false;
     }
     $rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change;
     $arr =& $rs->GetArray();
     $arr2 = array();
     for ($i = 0; $i < sizeof($arr); $i++) {
         if ($arr[$i][2] && substr($arr[$i][2], 0, 4) != 'MSys') {
             $arr2[] = $arr[$i][2];
         }
     }
     return $arr2;
 }
开发者ID:OberjukhtinIA0VWV0Allokuum,项目名称:testmasteke.leo,代码行数:21,代码来源:adodb-access.inc.php


示例3: MetaTables

 function MetaTables($ttype = false, $showSchema = false, $qtable = "%", $qschema = "%")
 {
     global $ADODB_FETCH_MODE;
     $savem = $ADODB_FETCH_MODE;
     $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
     $qid = odbc_tables($this->_connectionID, "", $qschema, $qtable, "");
     $rs = new ADORecordSet_odbc($qid);
     $ADODB_FETCH_MODE = $savem;
     if (!$rs) {
         $false = false;
         return $false;
     }
     $rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change;
     $arr = $rs->GetArray();
     //print_r($arr);
     $rs->Close();
     $arr2 = array();
     if ($ttype) {
         $isview = strncmp($ttype, 'V', 1) === 0;
     }
     for ($i = 0; $i < sizeof($arr); $i++) {
         if (!$arr[$i][2]) {
             continue;
         }
         if (strncmp($arr[$i][1], 'SYS', 3) === 0) {
             continue;
         }
         $type = $arr[$i][3];
         if ($showSchema) {
             $arr[$i][2] = $arr[$i][1] . '.' . $arr[$i][2];
         }
         if ($ttype) {
             if ($isview) {
                 if (strncmp($type, 'V', 1) === 0) {
                     $arr2[] = $arr[$i][2];
                 }
             } else {
                 if (strncmp($type, 'T', 1) === 0) {
                     $arr2[] = $arr[$i][2];
                 }
             }
         } else {
             if (strncmp($type, 'S', 1) !== 0) {
                 $arr2[] = $arr[$i][2];
             }
         }
     }
     return $arr2;
 }
开发者ID:klgrimley,项目名称:CIT-313,代码行数:49,代码来源:adodb-odbc_db2.inc.php


示例4: odbc_tables

 function &MetaTables($showSchema = false)
 {
     global $ADODB_FETCH_MODE;
     $savem = $ADODB_FETCH_MODE;
     $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
     $qid = odbc_tables($this->_connectionID);
     $rs = new ADORecordSet_odbc($qid);
     $ADODB_FETCH_MODE = $savem;
     if (!$rs) {
         return false;
     }
     $rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change;
     //print_r($rs);
     $arr =& $rs->GetArray();
     $rs->Close();
     $arr2 = array();
     //print_r($arr);
     for ($i = 0; $i < sizeof($arr); $i++) {
         $row = $arr[$i];
         if ($row[2] && strncmp($row[1], 'SYS', 3) != 0) {
             if ($showSchema) {
                 $arr2[] = $row[1] . '.' . $row[2];
             } else {
                 $arr2[] = $row[2];
             }
         }
     }
     return $arr2;
 }
开发者ID:katopenzz,项目名称:openemr,代码行数:29,代码来源:adodb-db2.inc.php


示例5: MetaColumns

 function MetaColumns($table)
 {
     global $ADODB_FETCH_MODE;
     $false = false;
     if ($this->uCaseTables) {
         $table = strtoupper($table);
     }
     $schema = '';
     $this->_findschema($table, $schema);
     $savem = $ADODB_FETCH_MODE;
     $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
     /*if (false) { // after testing, confirmed that the following does not work becoz of a bug
     			$qid2 = odbc_tables($this->_connectionID);
     			$rs = new ADORecordSet_odbc($qid2);		
     			$ADODB_FETCH_MODE = $savem;
     			if (!$rs) return false;
     			$rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change;
     			$rs->_fetch();
     			
     			while (!$rs->EOF) {
     				if ($table == strtoupper($rs->fields[2])) {
     					$q = $rs->fields[0];
     					$o = $rs->fields[1];
     					break;
     				}
     				$rs->MoveNext();
     			}
     			$rs->Close();
     			
     			$qid = odbc_columns($this->_connectionID,$q,$o,strtoupper($table),'%');
     		} */
     switch ($this->databaseType) {
         case 'access':
         case 'vfp':
             $qid = odbc_columns($this->_connectionID);
             #,'%','',strtoupper($table),'%');
             break;
         case 'db2':
             $colname = "%";
             $qid = odbc_columns($this->_connectionID, "", $schema, $table, $colname);
             break;
         default:
             $qid = @odbc_columns($this->_connectionID, '%', '%', strtoupper($table), '%');
             if (empty($qid)) {
                 $qid = odbc_columns($this->_connectionID);
             }
             break;
     }
     if (empty($qid)) {
         return $false;
     }
     $rs = new ADORecordSet_odbc($qid);
     $ADODB_FETCH_MODE = $savem;
     if (!$rs) {
         return $false;
     }
     $rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change;
     $rs->_fetch();
     $retarr = array();
     /*
     $rs->fields indices
     0 TABLE_QUALIFIER
     1 TABLE_SCHEM
     2 TABLE_NAME
     3 COLUMN_NAME
     4 DATA_TYPE
     5 TYPE_NAME
     6 PRECISION
     7 LENGTH
     8 SCALE
     9 RADIX
     10 NULLABLE
     11 REMARKS
     */
     while (!$rs->EOF) {
         //	adodb_pr($rs->fields);
         if (strtoupper(trim($rs->fields[2])) == $table && (!$schema || strtoupper($rs->fields[1]) == $schema)) {
             $fld = new ADOFieldObject();
             $fld->name = $rs->fields[3];
             $fld->type = $this->ODBCTypes($rs->fields[4]);
             // ref: http://msdn.microsoft.com/library/default.asp?url=/archive/en-us/dnaraccgen/html/msdn_odk.asp
             // access uses precision to store length for char/varchar
             if ($fld->type == 'C' or $fld->type == 'X') {
                 if ($this->databaseType == 'access') {
                     $fld->max_length = $rs->fields[6];
                 } else {
                     if ($rs->fields[4] <= -95) {
                         // UNICODE
                         $fld->max_length = $rs->fields[7] / 2;
                     } else {
                         $fld->max_length = $rs->fields[7];
                     }
                 }
             } else {
                 $fld->max_length = $rs->fields[7];
             }
             $fld->not_null = !empty($rs->fields[10]);
             $fld->scale = $rs->fields[8];
             $retarr[strtoupper($fld->name)] = $fld;
         } else {
//.........这里部分代码省略.........
开发者ID:chiranjeevjain,项目名称:agilebill,代码行数:101,代码来源:adodb-odbc.inc.php


示例6: strtoupper

 function &MetaColumns($table)
 {
     $table = strtoupper($table);
     /* // for some reason, cannot view only 1 table with odbc_columns -- bug?
     		$qid = odbc_tables($this->_connectionID);
     		$rs = new ADORecordSet_odbc($qid);
     		if (!$rs) return false;
     		while (!$rs->EOF) {
     			if ($table == strtoupper($rs->fields[2])) {
     				$q = $rs->fields[0];
     				$o = $rs->fields[1];
     				break;
     			}
     			$rs->MoveNext();
     		}
     		$rs->Close();
     		
     		$qid = odbc_columns($this->_connectionID,$q,$o,strtoupper($table),'%');
     	*/
     $qid = odbc_columns($this->_connectionID);
     $rs = new ADORecordSet_odbc($qid);
     if (!$rs) {
         return false;
     }
     $retarr = array();
     while (!$rs->EOF) {
         if (strtoupper($rs->fields[2]) == $table) {
             $fld = new ADOFieldObject();
             $fld->name = $rs->fields[3];
             $fld->type = $this->ODBCTypes($rs->fields[4]);
             $fld->max_length = $rs->fields[7];
             $retarr[strtoupper($fld->name)] = $fld;
         } else {
             if (sizeof($retarr) > 0) {
                 break;
             }
         }
         $rs->MoveNext();
     }
     $rs->Close();
     //-- crashes 4.03pl1 -- why?
     return $retarr;
 }
开发者ID:qoire,项目名称:portal,代码行数:43,代码来源:adodb-odbc.inc.php


示例7: odbc_tables

	function &MetaTables($ttype=false)
	{
	global $ADODB_FETCH_MODE;
	
		$savem = $ADODB_FETCH_MODE;
		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
		$qid = odbc_tables($this->_connectionID);
		
		$rs = new ADORecordSet_odbc($qid);
		
		$ADODB_FETCH_MODE = $savem;
		if (!$rs) {
			$false = false;
			return $false;
		}
		$rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change;
		
		$arr =& $rs->GetArray();
		//print_r($arr);
		
		$rs->Close();
		$arr2 = array();
		
		if ($ttype) {
			$isview = strncmp($ttype,'V',1) === 0;
		}
		for ($i=0; $i < sizeof($arr); $i++) {
			if (!$arr[$i][2]) continue;
			$type = $arr[$i][3];
			if ($ttype) { 
				if ($isview) {
					if (strncmp($type,'V',1) === 0) $arr2[] = $arr[$i][2];
				} else if (strncmp($type,'SYS',3) !== 0) $arr2[] = $arr[$i][2];
			} else if (strncmp($type,'SYS',3) !== 0) $arr2[] = $arr[$i][2];
		}
		return $arr2;
	}
开发者ID:joeymetal,项目名称:v1,代码行数:37,代码来源:adodb-odbc.inc.php


示例8:

 function __construct($id, $mode = false)
 {
     return parent::__construct($id, $mode);
 }
开发者ID:nicolas34732,项目名称:address_book,代码行数:4,代码来源:adodb-access.inc.php



注:本文中的ADORecordSet_odbc类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ADORecordSet_postgres64类代码示例发布时间:2022-05-23
下一篇:
PHP ADORecordSet_array类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap