Class ezSQL_postgresql

Description

ezSQL Database specific class - PostgreSQL Desc..: PostgreSQL component (part of ezSQL databse abstraction library)

Located in /postgresql/ez_sql_postgresql.php (line 14)

ezSQLcore
   |
   --ezSQL_postgresql
Variable Summary
boolean $show_errors
Method Summary
ezSQL_postgresql __construct ([string $dbuser = ''], [string $dbpassword = ''], [string $dbname = ''], [string $dbhost = 'localhost'], [string $dbport = '5432'])
boolean connect ([string $dbuser = ''], [string $dbpassword = ''], [string $dbname = ''], [string $dbhost = 'localhost'], [string $dbport = '5432'])
string descTable (string $tbl_name)
void disconnect ()
string escape (string $str)
string getDBHost ()
string getPort ()
boolean query (string $query)
boolean quick_connect ([string $dbuser = ''], [string $dbpassword = ''], [string $dbname = ''], [string $dbhost = 'localhost'], [string $dbport = '5432'])
boolean select ([string $dbuser = ''], [string $dbpassword = ''], [string $dbname = ''], [string $dbhost = 'localhost'], [string $dbport = '5432'])
string showDatabases ()
string showTables ()
string sysdate ()
Variables
Methods
Constructor __construct (line 77)

Constructor - allow the user to perform a qucik connect at the same time as initialising the ezSQL_postgresql class

  • access: public
ezSQL_postgresql __construct ([string $dbuser = ''], [string $dbpassword = ''], [string $dbname = ''], [string $dbhost = 'localhost'], [string $dbport = '5432'])
  • string $dbuser: The database user name
  • string $dbpassword: The database users password
  • string $dbname: The name of the database
  • string $dbhost: The host name or IP address of the database server. Default is localhost
  • string $dbport: The database TCP/IP port Default is PostgreSQL default port 5432

Redefinition of:
ezSQLcore::__construct()
Constructor of ezSQL
connect (line 131)

Try to connect to PostgreSQL database server

  • access: public
boolean connect ([string $dbuser = ''], [string $dbpassword = ''], [string $dbname = ''], [string $dbhost = 'localhost'], [string $dbport = '5432'])
  • string $dbuser: The database user name
  • string $dbpassword: The database users password
  • string $dbname: The name of the database
  • string $dbhost: The host name or IP address of the database server. Default is localhost
  • string $dbport: The database TCP/IP port Default is PostgreSQL default port 5432
descTable (line 213)

Return the description of the given table

  • access: public
string descTable (string $tbl_name)
  • string $tbl_name: The table name
disconnect (line 341)

Close the database connection

  • access: public
void disconnect ()
escape (line 183)

Format a mySQL string correctly for safe mySQL insert (no matter if magic quotes are on or not)

  • access: public
string escape (string $str)
  • string $str
getDBHost (line 353)

Returns the current database server host

  • access: public
string getDBHost ()
getPort (line 362)

Returns the current TCP/IP port

  • access: public
string getPort ()
query (line 232)

Perform PostgreSQL query and try to detirmin result value

  • access: public
boolean query (string $query)
  • string $query
quick_connect (line 108)

In the case of PostgreSQL quick_connect is not really needed because std.

connect already does what quick connect does - but for the sake of consistency it has been included

boolean quick_connect ([string $dbuser = ''], [string $dbpassword = ''], [string $dbname = ''], [string $dbhost = 'localhost'], [string $dbport = '5432'])
  • string $dbuser: The database user name
  • string $dbpassword: The database users password
  • string $dbname: The name of the database
  • string $dbhost: The host name or IP address of the database server. Default is localhost
  • string $dbport: The database TCP/IP port Default is PostgreSQL default port 5432
select (line 168)

No real equivalent of mySQL select in PostgreSQL once again, function included for the sake of consistency

  • access: public
boolean select ([string $dbuser = ''], [string $dbpassword = ''], [string $dbname = ''], [string $dbhost = 'localhost'], [string $dbport = '5432'])
  • string $dbuser: The database user name
  • string $dbpassword: The database users password
  • string $dbname: The name of the database
  • string $dbhost: The host name or IP address of the database server. Default is localhost
  • string $dbport: The database TCP/IP port Default is PostgreSQL default port 5432
showDatabases (line 222)

Return all databases of the current server

  • access: public
string showDatabases ()
showTables (line 203)

Return PostgreSQL specific values: Return all tables of the current schema

  • access: public
string showTables ()
sysdate (line 193)

Return PostgreSQL specific system date syntax i.e. Oracle: SYSDATE Mysql: NOW()

  • access: public
string sysdate ()

Inherited Methods

Inherited From ezSQLcore

ezSQLcore::__construct()
ezSQLcore::affectedRows()
ezSQLcore::debug()
ezSQLcore::donation()
ezSQLcore::dumpvar()
ezSQLcore::flush()
ezSQLcore::getShowErrors()
ezSQLcore::get_cache()
ezSQLcore::get_col()
ezSQLcore::get_col_info()
ezSQLcore::get_results()
ezSQLcore::get_row()
ezSQLcore::get_var()
ezSQLcore::hide_errors()
ezSQLcore::isConnected()
ezSQLcore::register_error()
ezSQLcore::show_errors()
ezSQLcore::store_cache()
ezSQLcore::timer_elapsed()
ezSQLcore::timer_get_cur()
ezSQLcore::timer_start()
ezSQLcore::timer_update_global()
ezSQLcore::vardump()
Class Constants

Documentation generated on Mon, 26 Aug 2013 23:22:23 +0200 by phpDocumentor 1.4.4