odbcrecordset.php

来自「实现flash的饼图投票」· PHP 代码 · 共 28 行

PHP
28
字号
<?phpclass odbcRecordSet{	var $initialData = array();	var $columnNames = array();	function odbcRecordSet($d)	{		// grab all of the rows		while ($line = odbc_fetch_row($d)) {			// decode each value ready for encoding when it goes through serialization			foreach($line as $key => $value) {				$line[$key] = utf8_decode($value);			}			// add each row to the initial data array			$this->initialData[] = $line;		}			// grab the number of fields		$fieldcount = odbc_num_fields($d);		// loop over all of the fields		for($i=0; $i<$fieldcount; $i++)	{			// decode each field name ready for encoding when it goes through serialization			// and save each field name into the array			$this->columnNames[$i] = utf8_decode(odbc_field_name($d, $i));		}		$this->numRows = odbc_num_rows($d);	}}?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?