MySQL 테이블이 존재하는지 확인하는 PHP 소스코드 예제




$result_exist = mysql_query("SHOW TABLES LIKE '테이블명'");

$row_exist = mysql_fetch_array($result_exist); 

if($row_exist == true){

// 테이블 존재

} else { 

// 테이블 없음

}




+ Recent posts