輸入待尋字串
  <?php
  require("http://php.wilson.gs");  // 回首頁
  echo "http://php.wilson.gs/bible/function.php : 函式:mysql_errno()";


函式:mysql_errno()


mysql_errno

傳回錯誤訊息代碼。

語法: int mysql_errno(int [link_identifier]);

傳回值: 整數

函式種類: 資料庫功能

內容說明

本函式可以得到 MySQL 資料庫伺服器的錯誤代碼。通常用在 PHP 網頁程式開發階段,作為 PHP 與 MySQL 的除錯用。

使用範例

<?php
mysql_connect
("marliesle");
echo 
mysql_errno().": ".mysql_error()."<BR>";
mysql_select_db("nonexistentdb");
echo 
mysql_errno().": ".mysql_error()."<BR>";
$conn mysql_query("SELECT * FROM nonexistenttable");
echo 
mysql_errno().": ".mysql_error()."<BR>";
?>

參考

mysql_error()  


[ 上一頁 /bible/function.php 下一頁 ]



本站置於 NEC BIGLOBE 地球村網際網路  echo "Copyright © 1999-2001, Wilson Peng";  //隱私權保護政策
  mail("wilson@biglobe.net.tw", "Feedback", $message);
  ?>