From 724a15866c2b7bf4f17d305beb09309f0f172acf Mon Sep 17 00:00:00 2001 From: chicpro Date: Mon, 12 Oct 2015 15:31:03 +0900 Subject: [PATCH] =?UTF-8?q?sql=5Ferror=5Finfo=20=ED=95=A8=EC=88=98=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/common.lib.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/common.lib.php b/lib/common.lib.php index e15c09923..33a12b3fd 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -1598,6 +1598,21 @@ function sql_field_names($table, $link=null) } +function sql_error_info($link=null) +{ + global $g5; + + if(!$link) + $link = $g5['connect_db']; + + if(function_exists('mysqli_error')) { + return mysqli_errno($link) . ' : ' . mysqli_error($link); + } else { + return mysql_errno($link) . ' : ' . mysql_error($link); + } +} + + // PHPMyAdmin 참고 function get_table_define($table, $crlf="\n") {