diff options
author | mistic100 <mistic@piwigo.org> | 2013-03-02 12:19:06 +0000 |
---|---|---|
committer | mistic100 <mistic@piwigo.org> | 2013-03-02 12:19:06 +0000 |
commit | d441783ca34af35ef7f139dc6f52fad62bd61a75 (patch) | |
tree | 3c0cc8a4a9c5760bcd44c3660a96f31dbbef451e /include | |
parent | a69847d7ab545a5c6b035a05399305793632f29e (diff) |
feature:65 add pwg_db_errno and pwg_db_error
git-svn-id: http://piwigo.org/svn/trunk@21088 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r-- | include/dblayer/functions_mysql.inc.php | 10 | ||||
-rw-r--r-- | include/dblayer/functions_mysqli.inc.php | 14 |
2 files changed, 24 insertions, 0 deletions
diff --git a/include/dblayer/functions_mysql.inc.php b/include/dblayer/functions_mysql.inc.php index 2fbf8d3e9..9c73637ee 100644 --- a/include/dblayer/functions_mysql.inc.php +++ b/include/dblayer/functions_mysql.inc.php @@ -179,6 +179,16 @@ function pwg_db_insert_id() return mysql_insert_id(); } +function pwg_db_errno() +{ + return mysql_errno(); +} + +function pwg_db_error() +{ + return mysql_error(); +} + function pwg_db_close() { return mysql_close(); diff --git a/include/dblayer/functions_mysqli.inc.php b/include/dblayer/functions_mysqli.inc.php index 97c1b873e..2c7f0c6af 100644 --- a/include/dblayer/functions_mysqli.inc.php +++ b/include/dblayer/functions_mysqli.inc.php @@ -189,6 +189,20 @@ function pwg_db_insert_id() return $mysqli->insert_id; } +function pwg_db_errno() +{ + global $mysqli; + + return $mysqli->errno; +} + +function pwg_db_error() +{ + global $mysqli; + + return $mysqli->error; +} + function pwg_db_close() { global $mysqli; |