프리랜서 웹디자이너 웹퍼블리셔RELATION

RELATION 로고

PHP 웹프로그래밍

[MYSQL함수] mysql_errno() 수행시 발생하는 에러의 에러번호를 반환

북마크 작성자 정보
MySQL 수행시 발생하는 에러의 에러 번호를 반환합니다.

int mysql_errno(int[접속구분자]);

보통 에러 메세지를 알려주는 mysql_error() 함수와 같이 쓰입니다.

<?
$connect = mysql_connect("localhost","php","12345");
mysql_select_db("php_db", $connect);
$sql = "delect from where id ='this'";
$result = mysql_query($sql, $connect);

if($result){
echo msql_error().": ".mysql_error();
}
mysql_close($connect);
?>

이 포스트 공유하기

전체목록