Add deleted to edit_group/user decl, add assoc only return for fetchrow

DB IO Fetchrow has assoc only true/false
Currently only tested with PgSQL

default returns both,
if set true only returns assoc
This commit is contained in:
Clemens Schwaighofer
2019-08-28 18:49:23 +09:00
parent 54b7af348b
commit a27e4603a8
4 changed files with 28 additions and 4 deletions

View File

@@ -190,6 +190,9 @@ class PgSQL
// DESC : wrapper for pg_fetch_array
public function __dbFetchArray($cursor, $result_type = '')
{
if ($result_type == true) {
$result_type = PGSQL_ASSOC;
}
// result type is passed on as is [should be checked]
if ($result_type) {
return pg_fetch_array($cursor, null, $result_type);
@@ -198,6 +201,18 @@ class PgSQL
}
}
// METHOD: __dbResultType
// PARAMS: true/false for ASSOC only or BOTH
// RETURN: PGSQL assoc type
// DESC : simple match up between assoc true/false
public function __dbResultType($assoc_type)
{
if ($assoc_type == true) {
return PGSQL_ASSOC;
}
return ''; // fallback to default
}
// METHOD: __dbFetchAll
// WAS : _db_fetch_all
// PARAMS: cursor