aboutsummaryrefslogtreecommitdiffstats
path: root/include/dblayer/functions_mysql.inc.php
diff options
context:
space:
mode:
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();
}
/**