feature 1255: add pwg_select_db function.

git-svn-id: http://piwigo.org/svn/trunk@5230 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
patdenice
2010-03-21 21:15:54 +00:00
parent 62ce6a7f15
commit 54c9ceb0f4
8 changed files with 47 additions and 19 deletions
+7 -2
View File
@@ -33,7 +33,7 @@ define('DB_RANDOM_FUNCTION', 'RANDOM');
*
*/
function pwg_db_connect($host, $user, $password, $database)
function pwg_db_connect($host, $user, $password, $database, $die=true)
{
$connection_string = '';
if (strpos($host,':') !== false)
@@ -49,11 +49,16 @@ function pwg_db_connect($host, $user, $password, $database)
$user,
$password,
$database);
$link = pg_connect($connection_string) or my_error('pg_connect', false);
$link = pg_connect($connection_string) or my_error('pg_connect', $die);
return $link;
}
function pwg_select_db($database=null, $link=null, $die=null)
{
return true;
}
function pwg_db_check_charset()
{
return true;