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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user