EDB
[ class tree: EDB ] [ index: EDB ] [ all elements ]

Class: EDB_MSSQL

Source Location: /EDB/EDB/EDB_MSSQL.php

Class Overview

EDB_Common
   |
   --EDB_MSSQL

MSSQL engine for EDB API


Methods


Inherited Variables

Inherited Methods

Class: EDB_Common

EDB_Common::bind_param()
replace bind parameters to parameter's value
EDB_Common::check_param()
Check parameter type and parameters
EDB_Common::file_exists()
Checks whether a file or directory exists
EDB_Common::get_param_number()
Get number of query parameters
EDB_Common::switch_freemark()
Change free marking

Class Details

[line 27]
MSSQL engine for EDB API

This class support abstracttion DB layer for MSSQL Engine




[ Top ]


Class Methods


constructor __construct [line 71]

EDB_MSSQL __construct( string $hostname, string $user, string $password, string $database)

Instantiates an EDB_MSSQL object and opens an MSSQL database

For examples:

  1.  $db new EDB_MSSQL ('mssql://localhost''user''host''database');
  2.  $db new EDB_MSSQL ('mssql://localhost:33000''user''host''database');
  3.  $db new EDB_MSSQL ('mssql://localhost:33000?autocommit=false''user''host''database');

If you add prefix 'p~' before host, you can connect with persistent connection.

For Examples:

  1.  $db new EDB_MSSQL ('mssql://p~localhost''user''host''database');




Tags:

access:  public


Parameters:

string   $hostname   MSSQL host
string   $user   MSSQL user
string   $password   MSSQL password
string   $database   MSSQL database

[ Top ]

destructor __destruct [line 492]

void __destruct( )



[ Top ]

method close [line 403]

void close( void 0)

Close the db handle



Tags:

access:  public


Parameters:

void   0  

[ Top ]

method escape [line 141]

string escape( string $string)

Escape special characters in a string for use in an SQL statement



Tags:

access:  public


Parameters:

string   $string   The string that is to be escaped.

[ Top ]

method fetch [line 246]

object|false fetch( [boolean $free = false])

Fetch a result row as an associative object



Tags:

return:  The object of fetched a result row or false
access:  public


Parameters:

boolean   $free   (optional) 수행 후 result를 free 한다. 기본값: false EDB >= 2.0.3

[ Top ]

method fetch_all [line 268]

array fetch_all( [boolean $free = true])

Fetch all result rows as an associative object



Tags:

return:  The fetched object result rows
access:  public


Parameters:

boolean   $free   (optional) free result set after fetch. Defaluts is true.

[ Top ]

method field_name [line 315]

string|false field_name( integer $index)

Return the name of the specified field index



Tags:

access:  public


Parameters:

integer   $index   The numerical field offset. The field_offset starts at 0. If field_offset does not exist, return false and an error of level E_WARNING is also issued.

[ Top ]

method field_type [line 337]

string|false field_type( integer $index)

Get the type of the specified field in a result



Tags:

access:  public


Parameters:

integer   $index   The numerical field offset. The field_offset starts at 0. If field_offset does not exist, return false and an error of level E_WARNING is also issued.

[ Top ]

method free_result [line 289]

boolean free_result( void 0)

Frees stored result memory for the given statement handle



Tags:

access:  public


Parameters:

void   0  

[ Top ]

method get_charset [line 112]

string get_charset( )

Get character set of current database

MSSQL extension don't support this function




Tags:

return:  Current character set name on DB
access:  public


[ Top ]

method lastId [line 204]

string|false lastId( )

가장 마지막 입력 row의 OID를 반환한다.



Tags:

since:  2.0.4
access:  public


[ Top ]

method num_fields [line 357]

integer|false num_fields( )

Return the number of columns in the result set



Tags:

return:  return -1 if SQL sentence is not SELECT.
access:  public


[ Top ]

method query [line 165]

integer query( string $query, string $type, mixed $param1, mixed $param2,...)

Performs a query on the database



Tags:

return:  The number of affected rows or false
access:  public


Parameters:

string   $query   The query strings
string   $type   (optional) Bind parameter type. See also
  1.  => integer
  2.  => double
  3.  => string
  4.  => blob
  5.  => clob
  6.  => null
mixed   $param1   (optional) Bind parameter 1
mixed   $param2,...   (optional) Bind parameter 2 ..

[ Top ]

method seek [line 224]

boolean seek( Number $offset)

Move the cursor in the result



Tags:

access:  public


Parameters:

Number   $offset   of units you want to move the cursor.

[ Top ]

method set_charset [line 128]

bool set_charset( string $char)

Set character set of current database

This method is always returned true because MSSQL don't support charset settings.




Tags:

return:  always return true
access:  public


Parameters:

string   $char   name of character set that supported from database

[ Top ]

method trend [line 389]

void trend( [bool $v = true])

DB transaction 을 종료한다.



Tags:

access:  public


Parameters:

bool   $v   false일경우 rollback을 수행한다.

[ Top ]

method trstart [line 376]

void trstart( )

DB transaction 을 시작한다.



Tags:

access:  public


[ Top ]


Documentation generated on Fri, 30 Aug 2024 06:10:12 +0900 by phpDocumentor 1.4.4