aboutsummaryrefslogtreecommitdiffstats
path: root/include/dblayer/functions_mysql.inc.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2013-01-30 11:12:22 +0000
committermistic100 <mistic@piwigo.org>2013-01-30 11:12:22 +0000
commit6f04aba061be1202b7f987db6bac03014cf01aeb (patch)
treedc59c3e896685d403019bbb5d167c1057af21119 /include/dblayer/functions_mysql.inc.php
parent0bba3bfcf74c8da52c722fc06084c0e779178187 (diff)
feature:65 Add support for PHP mysqli extension, activated by default, remove returns of link_identifier
git-svn-id: http://piwigo.org/svn/trunk@20462 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/dblayer/functions_mysql.inc.php14
1 files changed, 5 insertions, 9 deletions
diff --git a/include/dblayer/functions_mysql.inc.php b/include/dblayer/functions_mysql.inc.php
index 0b2c35195..f8182bdf4 100644
--- a/include/dblayer/functions_mysql.inc.php
+++ b/include/dblayer/functions_mysql.inc.php
@@ -40,11 +40,7 @@ function pwg_db_connect($host, $user, $password, $database)
{
throw new Exception("Can't connect to server");
}
- if (mysql_select_db($database, $link))
- {
- return $link;
- }
- else
+ if (!mysql_select_db($database, $link))
{
throw new Exception('Connection to server succeed, but it was impossible to connect to database');
}
@@ -138,7 +134,7 @@ SELECT IF(MAX('.$column.')+1 IS NULL, 1, MAX('.$column.')+1)
return $next;
}
-function pwg_db_changes($result)
+function pwg_db_changes()
{
return mysql_affected_rows();
}
@@ -173,14 +169,14 @@ function pwg_db_real_escape_string($s)
return mysql_real_escape_string($s);
}
-function pwg_db_insert_id($table=null, $column='id')
+function pwg_db_insert_id()
{
return mysql_insert_id();
}
-function pwg_db_close($link=null)
+function pwg_db_close()
{
- return mysql_close($link);
+ return mysql_close();
}
/**