PHP Classes

File: db_postgresql.php

Recommend this page to a friend!
  Classes of Eustaquio Rangel de Oliveira Jr.   phpreports   db_postgresql.php   Download  
File: db_postgresql.php
Role: Auxiliary script
Content type: text/plain
Description: PostgreSQL database interface
Class: phpreports
Report Generator
Author: By
Last change:
Date: 21 years ago
Size: 733 bytes
 

Contents

Class file image Download
<?php
   
function db_connect($oArray) {
       
$sString = "user='".$oArray[0]."' password='".$oArray[1]."' dbname='".$oArray[2]."'";
        return
pg_connect($sString);
    }

    function
db_select_db($sDatabase) {
        return
null;
    }

    function
db_query($oCon,$sSQL) {
       
$oStmt = pg_query($oCon,$sSQL);
        return
$oStmt;
    }

    function
db_colnum($oStmt) {
        return
pg_num_fields($oStmt);
    }

    function
db_columnName($oStmt,$iPos) {
        return
pg_field_name($oStmt,$iPos);
    }
   
    function
db_columnType($oStmt,$iPos) {
        return
pg_field_type($oStmt,$iPos);
    }

    function
db_fetch($oStmt) {
        return
pg_fetch_assoc($oStmt);
    }

    function
db_free($oStmt) {
        return
pg_free_result($oStmt);
    }

    function
db_disconnect($oCon) {
        return
pg_close($oCon);
    }
?>