$sql = "SELECT * from Person";
$result = mysql_query($sql,$con); while ($property = mysql_fetch_field($result))
{
echo "Field name: " . $property->name . "<br />";
echo "Table name: " . $property->table . "<br />";
echo "Default value: " . $property->def . "<br />";
echo "Max length: " . $property->max_length . "<br />";
echo "Not NULL: " . $property->not_null . "<br />";
echo "Primary Key: " . $property->primary_key . "<br />";
echo "Unique Key: " . $property->unique_key . "<br />";
echo "Mutliple Key: " . $property->multiple_key . "<br />";
echo "Numeric Field: " . $property->numeric . "<br />";
echo "BLOB: " . $property->blob . "<br />";
echo "Field Type: " . $property->type . "<br />";
echo "Unsigned: " . $property->unsigned . "<br />";
echo "Zero-filled: " . $property->zerofill . "<br /><br />";
}

关键字段:
echo "Primary Key: " . $property->primary_key . "<br />";

最新文章

  1. css 文字溢出隐藏 带省略号
  2. C#中web页面之间传递数组参数
  3. phpcms分页用法简介
  4. MVC 為頁面的list資料重新命名
  5. keil编译STM32工程时 #error directive: &quot;Please select first the target STM32F10x device used in your application (in stm32f10x.h file)&quot;
  6. 【USACO 3.1.6】邮票
  7. [Python Web]部署完网站需要做的一些后续工作
  8. [转载] 深入剖析 redis 主从复制
  9. faster-rcnn系列笔记(一)
  10. mobile_像素
  11. returnFunc.js
  12. Linux内核分析 读书笔记 (第五章)
  13. centos7 服务操作命令
  14. 【算法】Huffman编码(数据结构+算法)
  15. 微信小程序-携带参数的二维码条形码生成
  16. dp之二维背包poj1837(天平问题 推荐)
  17. git练习
  18. 【DUBBO】Dubbo:protocol 的配置项
  19. window server 搭建git服务器
  20. Nginx配置中last和break及permanent和redirect的区别

热门文章

  1. bootstarp(carousel)组件
  2. juce中的CallbackMessage
  3. javascript 数组的常用操作函数
  4. SUBSTRING_INDEX ——网上的解释
  5. linux杂记(一)各硬件装置在linux中的代号
  6. 一个简单的php函数调用实例
  7. windows中copy命令详解
  8. java后台开发- NOTE
  9. Oracle EBS-SQL (SYS-19):sys-用户登陆纪录查询.sql
  10. web.config中&lt;customErrors&gt;节点