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

PHP mysql_field_table函数代码示例

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

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



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

示例1: getAccessInfo

function getAccessInfo($sql_fields, $sql_table, $sql_conditions = "1", $cond = NULL)
{
    $access['Data'] = array();
    $access['Headers'] = 0;
    $access['Sql_Fields'] = $sql_fields;
    $access['Sql_Table'] = $sql_table;
    $access['Sql_Conditions'] = $sql_conditions;
    $sql = "Select {$sql_fields} from {$sql_table} where {$sql_conditions}";
    $result = sql_query_read($sql) or dieLog(mysql_error() . " ~ " . "<pre>{$sql}</pre>");
    if (mysql_num_rows($result) < 1) {
        return -1;
    }
    $row = mysql_fetch_row($result);
    $fields = mysql_num_fields($result);
    for ($i = 0; $i < $fields; $i++) {
        $type = mysql_field_type($result, $i);
        $name = mysql_field_name($result, $i);
        $len = mysql_field_len($result, $i);
        $flags = mysql_field_flags($result, $i);
        $table = mysql_field_table($result, $i);
        $useName = $name;
        if (array_key_exists($useName, $access['Data'])) {
            $useName = $name . $i;
        }
        if ($name == 'access_header') {
            $access['Headers']++;
        }
        $access['Data'][$useName] = getAttrib($name, $type, $len, $flags, $table, $row[$i], &$cond);
    }
    return $access;
}
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:____updateAccess.old.php


示例2: query

	function query($query, $singleResult = 0) {

		$this->_result = mysql_query($query, $this->_dbHandle);
		
		
		if (preg_match("/select/i",$query)) {
		$result = array();
		$table = array();
		$field = array();
		$tempResults = array();
		$numOfFields = mysql_num_fields($this->_result);
		for ($i = 0; $i < $numOfFields; ++$i) {
		    array_push($table,mysql_field_table($this->_result, $i));
		    array_push($field,mysql_field_name($this->_result, $i));
		}
			while ($row = mysql_fetch_row($this->_result)) {
				for ($i = 0;$i < $numOfFields; ++$i) {
					$table[$i] = trim(ucfirst($table[$i]),"s");
					$tempResults[$table[$i]][$field[$i]] = $row[$i];
				}
				if ($singleResult == 1) {
		 			mysql_free_result($this->_result);
					return $tempResults;
				}
				array_push($result,$tempResults);
			}
			mysql_free_result($this->_result);
			return($result);
		}
		if(DB_DEVELOPMENT)  echo mysql_errno($this->_dbHandle),' : ',mysql_error($this->_dbHandle), '\n';
	}
开发者ID:nathanjsweet,项目名称:Reflexion,代码行数:31,代码来源:sql_query.internal.php


示例3: query

 /** 自定义SQL查询语句 **/
 function query($query, $singleResult = 0)
 {
     $this->_result = mysql_query($query, $this->_dbHandle);
     if (preg_match("/select/i", $query)) {
         $result = array();
         $table = array();
         $field = array();
         $tempResults = array();
         $numOfFields = mysql_num_fields($this->_result);
         //echo $numOfFields;
         for ($i = 0; $i < $numOfFields; ++$i) {
             array_push($table, mysql_field_table($this->_result, $i));
             array_push($field, mysql_field_name($this->_result, $i));
         }
         while ($row = mysql_fetch_row($this->_result)) {
             for ($i = 0; $i < $numOfFields; ++$i) {
                 $tempResults[$table[$i]][$field[$i]] = $row[$i];
             }
             if ($singleResult == 1) {
                 mysql_free_result($this->_result);
                 return $tempResults;
             }
             array_push($result, $tempResults);
         }
         mysql_free_result($this->_result);
         //var_dump($result);
         return $result;
     }
 }
开发者ID:Acernus,项目名称:phpProject,代码行数:30,代码来源:sqlquery.class.php


示例4: query

 function query($s = '', $rows = false, $organize = true)
 {
     if (!($q = mysql_query($s, $this->con))) {
         return false;
     }
     if ($rows !== false) {
         $rows = intval($rows);
     }
     $rez = array();
     $count = 0;
     $type = $organize ? MYSQL_NUM : MYSQL_ASSOC;
     while (($rows === false || $count < $rows) && ($line = mysql_fetch_array($q, $type))) {
         if ($organize) {
             foreach ($line as $field_id => $value) {
                 $table = mysql_field_table($q, $field_id);
                 if ($table === '') {
                     $table = 0;
                 }
                 $field = mysql_field_name($q, $field_id);
                 $rez[$count][$table][$field] = $value;
             }
         } else {
             $rez[$count] = $line;
         }
         ++$count;
     }
     $this->num = $count;
     if (!mysql_free_result($q)) {
         return false;
     }
     return $rez;
 }
开发者ID:ngadiono,项目名称:andrewsTest,代码行数:32,代码来源:Mysql.php


示例5: f_ReturnArrayAssoc_TF

	/**
	 * this returns a 2d associative array with the db "table.field" name as the first element
	 *
	 * @param string $sqlTemp
	 * @return array
	 */
	function f_ReturnArrayAssoc_TF($sqlTemp) {

		$result = mysql_query ($sqlTemp);
		if(mysql_errno() != 0) {
			echo "f_ReturnArrayAssoc_TF<BR><BR>";
			echo $sqlTemp . "<BR>";
			echo "<BR><BR>" . mysql_errno() . ": " . mysql_error() . "<BR>\n";
			exit;
		}
		$intNumColumns = mysql_num_fields($result) - 1; //make zero base

		$intNumRecords = mysql_num_rows($result) - 1; //make zero base

		//Get the table-column names
		for ($i=0; $i <= $intNumColumns; $i++) {
			$arrTableFieldStructure[$i][0] = mysql_field_table($result, $i) . "." . mysql_field_name($result, $i);
		}
		if ($intNumRecords > -1) {
			//Put the data into the array
			$arrData[0][0]; //Error preventor

			$intRecord = -1; //initialize row counter
			while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
				$intRecord++; //increment the counter

				for($intColumn = 0;$intColumn <= $intNumColumns;$intColumn++){
					$arrData[$arrTableFieldStructure[$intColumn][0]][$intRecord] = $row[$intColumn];

				}
			}
			return $arrData;
		} else {
			return -1;
		}
	}
开发者ID:sonnaxindustries,项目名称:sonnax_php,代码行数:41,代码来源:clsDataConn_org.php


示例6: getRow

 function getRow()
 {
     $rowData = array();
     for ($f = 0; $f < @mysql_num_fields($this->result); $f++) {
         $fieldName = @mysql_field_name($this->result, $f);
         $fieldTable = @mysql_field_table($this->result, $f);
         $rowData[$fieldTable . "." . $fieldName] = $this->row[$f];
         //htmlentities($this->row[$f]);
     }
     return $rowData;
 }
开发者ID:NerdZombies,项目名称:MateCode,代码行数:11,代码来源:MySQLPOSTA.php


示例7: readKeys

 function readKeys($result)
 {
     $keys = array('primary' => array(), 'foreign' => array());
     $column_num = mysql_num_fields($result);
     for ($i = 0; $i < $column_num; $i++) {
         $column = mysql_field_name($result, $i);
         $table = mysql_field_table($result, $i);
         if (strpos(mysql_field_flags($result, $i), 'primary_key') > 0) {
             $type = 'primary';
             $keys[$type][$table] = array('type' => $type, 'table' => $table, 'column' => $column);
         }
     }
     return $keys;
 }
开发者ID:iwater,项目名称:kissphp,代码行数:14,代码来源:Database.php


示例8: mysql_fetch_table

function mysql_fetch_table($result)
{
    if (!($row = mysql_fetch_array($result))) {
        return null;
    }
    $assoc = array();
    $rowCount = mysql_num_fields($result);
    for ($idx = 0; $idx < $rowCount; $idx++) {
        $table = mysql_field_table($result, $idx);
        $field = mysql_field_name($result, $idx);
        echo $assoc["{$table}.{$field}"] = $row[$idx] . "<BR />";
    }
    return $assoc;
}
开发者ID:bruce28,项目名称:vip,代码行数:14,代码来源:upload_mobile.php


示例9: getRow

 function getRow()
 {
     $rowData = array();
     for ($f = 0; $f < mysql_num_fields($this->result); $f++) {
         $fieldName = mysql_field_name($this->result, $f);
         $fieldTable = mysql_field_table($this->result, $f);
         //echo $fieldName."<br>";
         //echo mb_detect_encoding($this->row[$f],"UTF-8, ISO-8859-1");
         if (!in_array(mb_detect_encoding($this->row[$f], "UTF-8, ISO-8859-1"), array("UTF-8", "ISO-8859-1"))) {
             $rowData[$fieldTable . "." . $fieldName] = mb_convert_encoding($this->row[$f], "UTF-8");
             //htmlentities($this->row[$f]);
             //echo "convirtiendo";
         } else {
             $rowData[$fieldTable . "." . $fieldName] = $this->row[$f];
             //htmlentities($this->row[$f]);
         }
         //	echo "<hr>";
     }
     return $rowData;
 }
开发者ID:NerdZombies,项目名称:MateCode,代码行数:20,代码来源:MySQL.php


示例10: ddfield

function ddfield($table)
{
    if (!empty($table)) {
        $result = mysql_query("select * from {$table}");
        $fields = mysql_num_fields($result);
        $rows = mysql_num_rows($result);
        $table = mysql_field_table($result, $k);
        $k = 0;
        echo "<b>Table Properties: Name: {$table}</b><br>";
        echo "<table border='1' cellpadding='4' cellspacing='2' width='80%'><tr><td><b>Field Name</b></td><td><b>Field Type</b></td><td><b>Field Length</b></td><td><b>Field Flags<b></td></tr>";
        while ($k < $fields) {
            echo "<tr>";
            $name = mysql_field_name($result, $k);
            $type = mysql_field_type($result, $k);
            $len = mysql_field_len($result, $k);
            $flags = mysql_field_flags($result, $k);
            echo "<td>" . $name . "</td><td>" . $type . "</td><td>" . $len . "</td><td>" . $flags . "</td>";
            $k++;
            echo "</tr>";
        }
        echo "</table>";
    }
}
开发者ID:alexzita,项目名称:alex_blog,代码行数:23,代码来源:dataman_functions.php


示例11: f_ReturnArrayAssoc_TF

	/**
	 * this returns a 2d associative array with the db "table.field" name as the first element
	 *
	 * @param string $str_sql
	 * @return array
	 */
	function f_ReturnArrayAssoc_TF ($str_sql) {
		//echo $str_sql . "<BR>f_ReturnArrayAssoc_TF<HR>";
		$result = mysql_query($str_sql, $this->link);
		if(mysql_errno($this->link) != 0) {
			echo "f_ReturnArrayAssoc_TF<BR><BR>";
			echo $str_sql . "<BR>";
			echo "<BR><BR>" . mysql_errno($this->link) . ": " . mysql_error($this->link) . "<BR>\n";
			exit;
		}
		$intNumColumns = mysql_num_fields($result) - 1; //make zero base
		
		$intNumRecords = mysql_num_rows($result) - 1; //make zero base
		
		//Get the table-column names
		for ($i=0; $i <= $intNumColumns; $i++) {
			//we should probalby "strtolower()" here but there is a lot of extant code that would break
			$arrTableFieldStructure[$i][0] = mysql_field_table($result, $i) . "." . mysql_field_name($result, $i);
		}
		if ($intNumRecords > -1) {
			//Put the data into the array
			// $arrData[0][0]; //Error preventor

			$intRecord = -1; //initialize row counter
			while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
				$intRecord++; //increment the counter

				for($intColumn = 0;$intColumn <= $intNumColumns;$intColumn++){
					$arrData[$arrTableFieldStructure[$intColumn][0]][$intRecord] = $row[$intColumn];

				}
			}
			mysql_free_result($result);
			return $arrData;
		} else {
			return -1;
		}
	}
开发者ID:sonnaxindustries,项目名称:sonnax_php,代码行数:43,代码来源:clsDataConn_MINE.php


示例12: print_result

    function print_result($RESULT) {

        if(!$RESULT) return;

        if(mysql_num_rows($RESULT) < 1) return;
        $fieldcount = mysql_num_fields($RESULT);

        for ($i=0; $i<$fieldcount; $i++) {
            $tables[mysql_field_table($RESULT, $i)]++;
        }

        print '
            <style type="text/css">
                .rs_tb_th {
                    font-family: Verdana;
                    font-size:9pt;
                    font-weight:bold;
                    color:white;
                }
                .rs_f_th {
                    font-family:Verdana;
                    font-size:7pt;
                    font-weight:bold;
                    color:white;
                }
                .rs_td {
                    font-family:Verdana;
                    font-size:7pt;
                }
            </style>
            <script type="text/javascript" language="JavaScript">
                var lastID;
                function highlight(id) {
                    if(lastID) {
                        lastID.style.color = "#000000";
                        lastID.style.textDecoration = "none";
                    }
                    tdToHighlight = document.getElementById(id);
                    tdToHighlight.style.color ="#FF0000";
                    tdToHighlight.style.textDecoration = "underline";
                    lastID = tdToHighlight;
                }
            </script>
        ';

        print '<table bgcolor="#000000" cellspacing="1" cellpadding="1">';

        print '<tr>';
        foreach ($tables as $tableName => $tableCount) {
            $col == '0054A6' ? $col = '003471' : $col = '0054A6';
            print '<th colspan="'.$tableCount.'" class="rs_tb_th" style="background-color:#'.$col.';">'.$tableName.'</th>';
        }
        print '</tr>';

        print '<tr>';
        for ($i=0;$i < mysql_num_fields($RESULT);$i++) {
            $FIELD = mysql_field_name($RESULT, $i);
            $col == '0054A6' ? $col = '003471' : $col = '0054A6';
            print '<td align="center" bgcolor="#'.$col.'" class="rs_f_th">'.$FIELD.'</td>';
        }
        print '</tr>';

        mysql_data_seek($RESULT, 0);

        while ($DB_ROW = mysql_fetch_array($RESULT, MYSQL_NUM)) {
            $pointer++;
            if($toggle) {
                $col1 = "E6E6E6";
                $col2 = "DADADA";
            } else {
                $col1 = "E1F0FF";
                $col2 = "DAE8F7";
            }
            $toggle = !$toggle;
            print '<tr id="ROW'.$pointer.'" onMouseDown="highlight(\'ROW'.$pointer.'\');">';
            foreach ($DB_ROW as $value) {
                $col == $col1 ? $col = $col2 : $col = $col1;
                print '<td valign="top" bgcolor="#'.$col.'" class="rs_td" nowrap>'.nl2br($value).'</td>';
            }
            print '</tr>';
        }
        print '</table>';
        mysql_data_seek($RESULT, 0);
    }
开发者ID:noikiy,项目名称:mdwp,代码行数:84,代码来源:lib.debug.php


示例13: MySQL_Field_Table_Test

 /**
  * Test mysql_field_table
  *
  * @return boolean
  */
 public function MySQL_Field_Table_Test()
 {
     // Select Db
     $this->_selectDb();
     // Query
     $sql = 'SELECT * FROM ' . TEST_TABLE . ' LIMIT 1';
     // Query
     $query1 = mysql_query($sql);
     $query2 = $this->_object->mysql_query($sql);
     // Get items
     $table1 = mysql_field_table($query1, 0);
     $table2 = $this->_object->mysql_field_table($query2, 0);
     return $table1 === $table2;
 }
开发者ID:ReKungPaw,项目名称:mysql,代码行数:19,代码来源:MySQL_Test.php


示例14: mysql_fieldtable

 function mysql_fieldtable(...$args)
 {
     return mysql_field_table(...$args);
 }
开发者ID:gsomoza,项目名称:php7-mysql-shim,代码行数:4,代码来源:mysql.php


示例15: EchoFieldsHeader

function EchoFieldsHeader($res, $numfields)
{
	$str = "";
	for( $i = 0; $i < $numfields; $i++ ) {
		$str .= GetBlock(mysql_field_name($res, $i));
		$str .= GetBlock(mysql_field_table($res, $i));

		$type = mysql_field_type($res, $i);
		$length = mysql_field_len($res, $i);
		switch ($type) {
			case "int":
				if( $length > 11 ) $type = 8;
				else $type = 3;
				break;
			case "real":
				if( $length == 12 ) $type = 4;
				elseif( $length == 22 ) $type = 5;
				else $type = 0;
				break;
			case "null":
				$type = 6;
				break;
			case "timestamp":
				$type = 7;
				break;
			case "date":
				$type = 10;
				break;
			case "time":
				$type = 11;
				break;
			case "datetime":
				$type = 12;
				break;
			case "year":
				$type = 13;
				break;
			case "blob":
				if( $length > 16777215 ) $type = 251;
				elseif( $length > 65535 ) $type = 250;
				elseif( $length > 255 ) $type = 252;
				else $type = 249;
				break;
			default:
				$type = 253;
		}
		$str .= GetLongBinary($type);

		$flags = explode( " ", mysql_field_flags ( $res, $i ) );
		$intflag = 0;
		if(in_array( "not_null", $flags )) $intflag += 1;
		if(in_array( "primary_key", $flags )) $intflag += 2;
		if(in_array( "unique_key", $flags )) $intflag += 4;
		if(in_array( "multiple_key", $flags )) $intflag += 8;
		if(in_array( "blob", $flags )) $intflag += 16;
		if(in_array( "unsigned", $flags )) $intflag += 32;
		if(in_array( "zerofill", $flags )) $intflag += 64;
		if(in_array( "binary", $flags)) $intflag += 128;
		if(in_array( "enum", $flags )) $intflag += 256;
		if(in_array( "auto_increment", $flags )) $intflag += 512;
		if(in_array( "timestamp", $flags )) $intflag += 1024;
		if(in_array( "set", $flags )) $intflag += 2048;
		$str .= GetLongBinary($intflag);

		$str .= GetLongBinary($length);
	}
	echo $str;
}
开发者ID:xl7dev,项目名称:WebShell,代码行数:68,代码来源:ntunnel_mysql.php


示例16: _table_name

 protected function _table_name($field)
 {
     return mysql_field_table($this->_result, $field);
 }
开发者ID:ehrlichandreas,项目名称:ehrlichandreas1-pdo,代码行数:4,代码来源:Statement.php


示例17: mysql_query

        $sql_query = mysql_query($sql);
        $results = mysql_num_rows($sql_query);
        $sql_result_query = mysql_query("SELECT * FROM " . $country . " WHERE (DOCUMENT_NUMBER LIKE '%" . $search_term . "%' OR DESCRIPTION LIKE '%" . $search_term . "%') LIMIT {$first_pos}, {$RESULTS_LIMIT} ");
    }
    $stop_search = getmicrotime();
    $time_search = $stop_search - $start_search;
}
while ($row = mysql_fetch_array($sql_result_query)) {
    echo "<br>";
    $dnumber = $row['DOCUMENT_NUMBER'];
    $countryto = $_GET['countryto'];
    echo $dnumber;
    echo "&nbsp;&nbsp;&nbsp;";
    echo $row['STATUS'];
    echo "&nbsp;&nbsp;&nbsp;";
    echo "Origin: " . mysql_field_table($sql_result_query, 0);
    echo "<br>";
    echo $row['DESCRIPTION'];
    echo "<br>";
    echo "<a href=" . $row['LINK'] . "> View Here</a>";
}
echo "</th></tr></table>";
echo "<br> Time taken: <br>";
echo sprintf("%01.2f", $time_search);
?>


</body>
</html>
</p>
开发者ID:rory838,项目名称:206CDE,代码行数:30,代码来源:search.php


示例18: print_mysql_result

    function print_mysql_result($mysql_result, $return_mode = FALSE)
    {
        if (!$GLOBALS['USE_DEBUGLIB']) {
            return;
        }
        if (!$mysql_result || mysql_num_rows($mysql_result) < 1) {
            return;
        }
        $field_count = mysql_num_fields($mysql_result);
        $tables = array();
        for ($i = 0; $i < $field_count; $i++) {
            if (isset($tables[mysql_field_table($mysql_result, $i)])) {
                $tables[mysql_field_table($mysql_result, $i)]++;
            } else {
                $tables[mysql_field_table($mysql_result, $i)] = 1;
            }
        }
        $html = '
            <style type="text/css">
                table.DbugL_PR           { font-family: Verdana, Arial, Helvetica, Geneva, Swiss, SunSans-Regular, sans-serif; background:black; margin-bottom:10px; }
                table.DbugL_PR th.t_name { font-size:9pt; font-weight:bold; color:white; }
                table.DbugL_PR th.f_name { font-size:7pt; font-weight:bold; color:white; }
                table.DbugL_PR td        { padding-left:2px;font-size:7pt; white-space:nowrap; vertical-align:top; }
            </style>
            <script type="text/javascript">
                //<![CDATA[

                var DbugL_last_id;
                function DbugL_highlight(id) {
                    if(DbugL_last_id) {
                        DbugL_last_id.style.color = "#000000";
                        DbugL_last_id.style.textDecoration = "none";
                    }
                    var highlight_td;
                    highlight_td = document.getElementById(id);
                    highlight_td.style.color ="#FF0000";
                    highlight_td.style.textDecoration = "underline";
                    DbugL_last_id = highlight_td;
                }

                //]]>
            </script>
        ';
        $html .= '<table class="DbugL_PR" cellspacing="1" cellpadding="1">';
        $html .= '<tr>';
        foreach ($tables as $tableName => $tableCount) {
            !isset($col) || $col == '#006F05' ? $col = '#00A607' : ($col = '#006F05');
            $html .= '<th colspan="' . $tableCount . '" class="t_name" style="background:' . $col . ';">' . $tableName . '</th>';
        }
        $html .= '</tr>';
        $html .= '<tr>';
        for ($i = 0; $i < mysql_num_fields($mysql_result); $i++) {
            $field = mysql_field_name($mysql_result, $i);
            $col == '#0054A6' ? $col = '#003471' : ($col = '#0054A6');
            $html .= '<th style="background:' . $col . ';" class="f_name">' . $field . '</th>';
        }
        $html .= '</tr>';
        mysql_data_seek($mysql_result, 0);
        $toggle = FALSE;
        $pointer = 0;
        $table_id = str_replace('.', '', microtime(TRUE));
        while ($db_row = mysql_fetch_array($mysql_result, MYSQL_NUM)) {
            $pointer++;
            if ($toggle) {
                $col1 = "#E6E6E6";
                $col2 = "#DADADA";
            } else {
                $col1 = "#E1F0FF";
                $col2 = "#DAE8F7";
            }
            $toggle = !$toggle;
            $id = 'DbugL_' . $table_id . '_' . $pointer;
            $html .= '<tr id="' . $id . '" onMouseDown="DbugL_highlight(\'' . $id . '\');">';
            foreach ($db_row as $i => $value) {
                $col == $col1 ? $col = $col2 : ($col = $col1);
                $flags = mysql_field_flags($mysql_result, $i);
                $primary_flag = strpos($flags, 'primary_key') !== FALSE;
                $html .= '<td style="background:' . $col . ';' . ($primary_flag ? 'font-weight:bold;' : '') . '" nowrap="nowrap">' . nl2br($value) . '</td>';
            }
            $html .= '</tr>';
        }
        $html .= '</table>';
        mysql_data_seek($mysql_result, 0);
        if ($return_mode) {
            return $html;
        } else {
            print $html;
        }
    }
开发者ID:sssAlchemy,项目名称:Panda,代码行数:89,代码来源:debuglib.php


示例19: table_info

 public function table_info($table)
 {
     if ($table) {
         $this->result = mysql_query("select * from {$table}");
         $this->query = "select * from {$table}";
         $fields = mysql_num_fields($this->result);
         $rows = mysql_num_rows($this->result);
         $table = mysql_field_table($this->result, 0);
         print "\tThe '<strong>" . $table . "</strong>' table has <strong>" . $fields . "</strong> fields and <strong>" . $rows . "</strong>\n\t\t\t\t\t\trecord(s) with following fields.\n<br /><ul>";
         for ($i = 0; $i < $fields; $i++) {
             $type = mysql_field_type($this->result, $i);
             $name = mysql_field_name($this->result, $i);
             $len = mysql_field_len($this->result, $i);
             $flags = mysql_field_flags($this->result, $i);
             print "<strong><li>" . $type . " " . $name . " " . $len . " " . $flags . "</strong></li>\n";
         }
         print "</ul>";
     } else {
         print "The table not specified !!";
     }
 }
开发者ID:juliushermosura,项目名称:globeloop,代码行数:21,代码来源:class_database.php


示例20: mysql_select_db

<title></title>
</head>

<body bgcolor="#FFFFCC" text="#000000" link="#006600" vlink="#993333" alink="#CC6600" background="rlaemb.JPG">

<?php 
$priviledge = '00';
include 'allow_to_show.inc';
$dbcont = "invalid";
include "connet_root.inc";
mysql_select_db("timesheet");
$result = mysql_query("SELECT * FROM iplist");
$fields = mysql_num_fields($result);
$rows = mysql_num_rows($result);
$i = 0;
$table = mysql_field_table($result, $i);
echo "<b>Table '" . $table . "' has " . $fields . " fields and " . $rows . " records.<br><br></b>";
echo '<br><font size="2" color="#0000FF"><b>Records are:</b></font><BR>';
echo "<table border=\"1\">";
echo "<tr>";
$i = 0;
while ($i < $fields) {
    $name = mysql_field_name($result, $i);
    printf("<td>%s</td>", $name);
    $i++;
}
echo "</tr>";
while ($myrow = mysql_fetch_array($result)) {
    echo "<tr>";
    $i = 0;
    $i = (int) 1.5;
开发者ID:CMMCO,项目名称:Intranet,代码行数:31,代码来源:list_rcds.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP mysql_field_type函数代码示例发布时间:2022-05-15
下一篇:
PHP mysql_field_seek函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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