Class ezSQL_sybase

Description

ezSQL class - Sybase ASE Desc..: Sybase ASE component (part of ezSQL database abstraction library) - based on ezSql_mssql library class.

  • author: Muhammad Iyas (iyasilias@gmail.com)
  • author: Stefanie Janine Stoelting <mail@stefanie-stoelting.de>
  • link:
  • name: ezSQL_sybase
  • license: FREE

Located in /sybase/ez_sql_sybase.php (line 15)

ezSQLcore
   |
   --ezSQL_sybase
Variable Summary
boolean $show_errors
Method Summary
ezSQL_sybase __construct ([string $dbuser = ''], [string $dbpassword = ''], [string $dbname = ''], [string $dbhost = 'localhost'], [boolean $convertMySqlToSybaseQuery = true])
boolean connect ([string $dbuser = ''], [string $dbpassword = ''], [string $dbhost = 'localhost'])
string ConvertMySqlTosybase (string $query)
void disconnect ()
string escape (string $str)
string getDBHost ()
object query (string $query)
boolean quick_connect ([string $dbuser = ''], [string $dbpassword = ''], [string $dbname = ''], [string $dbhost = 'localhost'])
boolean select ([string $dbname = ''])
string sysdate ()
Variables
Methods
Constructor __construct (line 85)
  • throws: Exception Requires ntwdblib.dll and ez_sql_core.php
  • access: public
ezSQL_sybase __construct ([string $dbuser = ''], [string $dbpassword = ''], [string $dbname = ''], [string $dbhost = 'localhost'], [boolean $convertMySqlToSybaseQuery = true])
  • string $dbuser: The database user name Default is empty string
  • string $dbpassword: The database users password Default is empty string
  • string $dbname: The name of the database Default is empty string
  • string $dbhost: The host name or IP address of the database server. Default is localhost
  • boolean $convertMySqlToSybaseQuery: Default is true

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

Try to connect to sybase database server

  • access: public
boolean connect ([string $dbuser = ''], [string $dbpassword = ''], [string $dbhost = 'localhost'])
  • string $dbuser: The database user name Default is empty string
  • string $dbpassword: The database users password Default is empty string
  • string $dbhost: The host name or IP address of the database server. Default is localhost
ConvertMySqlTosybase (line 377)

Convert a Query From MySql Syntax to Sybase syntax Following conversions are made:

  1. The '`' character used for MySql queries is not supported - the character is removed.

2. FROM_UNIXTIME method is not supported. The Function is removed.It is replaced with getDate(). Warning: This logic may not be right. 3. unix_timestamp function is removed. 4. LIMIT keyowrd is replaced with TOP keyword. Warning: Logic not fully tested.

Note: This method is only a small attempt to convert the syntax. There are many aspects which are not covered here. This method doesn't at all guarantee complete conversion. Certain queries will still not work.

  • access: public
string ConvertMySqlTosybase (string $query)
  • string $query
disconnect (line 421)

Close the database connection

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

Format a sybase string correctly for safe sybase insert

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

Returns the current database server host

  • access: public
string getDBHost ()
query (line 240)

Perform sybase query and try to detirmin result value

  • access: public
object query (string $query)
  • string $query
quick_connect (line 117)

Short hand way to connect to sybase database server and select a sybase database at the same time

  • access: public
boolean quick_connect ([string $dbuser = ''], [string $dbpassword = ''], [string $dbname = ''], [string $dbhost = 'localhost'])
  • string $dbuser: The database user name Default is empty string
  • string $dbpassword: The database users password Default is empty string
  • string $dbname: The name of the database Default is empty string
  • string $dbhost: The host name or IP address of the database server. Default is localhost
select (line 166)

Try to select a sybase database

  • access: public
boolean select ([string $dbname = ''])
  • string $dbname
sysdate (line 230)

Return sybase specific system date syntax i.e. Oracle: SYSDATE sybase: getDate()

  • 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:24 +0200 by phpDocumentor 1.4.4