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

Class: EDB_MYSQLI

Source Location: /EDB/EDB/EDB_MYSQLI.php

Class Overview

EDB_Common
   |
   --EDB_MYSQLI

MySQLi 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]
MySQLi engine for EDB API

This class support abstracttion DB layer for MySQLi Engine




[ Top ]


Class Methods


constructor __construct [line 76]

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

Instantiates an EDB_MYSQLI object and opens an mysql database

For examples:

  1.  $db new EDB_MYSQLI ('mysqli://localhost''user''host''database');
  2.  $db new EDB_MYSQLI ('mysqli://localhost:3306''user''host''database');
  3.  $db new EDB_MYSQLI ('mysqli://localhost:/var/run/mysqld/mysql.socl''user''host''database');

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

For Examples:

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




Tags:

access:  public


Parameters:

string   $hostname   mysql host
string   $user   mysql user
string   $password   mysql password
string   $database   mysql database

[ Top ]

destructor __destruct [line 780]

void __destruct( )



[ Top ]

method close [line 426]

void close( void 0)

Close the db handle



Tags:

access:  public


Parameters:

void   0  

[ Top ]

method escape [line 161]

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 255]

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

Fetch a result row as an associative object



Tags:

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


Parameters:

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

[ Top ]

method fetch_all [line 283]

array fetch_all( [boolean $free = true])

Fetch all result rows as an associative object



Tags:

return:  The fetched result rows
access:  public


Parameters:

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

[ Top ]

method field_name [line 338]

string|false field_name( integer $index)

Get the name of the specified field in a result



Tags:

access:  public


Parameters:

integer   $index   The field number. This value must be in the range from 0 to number of fields - 1.

[ Top ]

method field_type [line 361]

string|false field_type( integer $index)

Get the type of the specified field in a result



Tags:



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 307]

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 123]

string get_charset( )

Get character set of current database



Tags:

return:  Current character set name on DB
access:  public


[ Top ]

method lastId [line 220]

integer|false lastId( )

마지막 실행한 쿼리에서 자동으로 생성된 ID(auto increment)값을 반환



Tags:

since:  2.0.4
access:  public


[ Top ]

method num_fields [line 381]

integer num_fields( )

Returns the number of columns for the most recent query



Tags:

return:  An integer representing the number of fields in a result set.
see:  http://php.net/manual/en/mysqli.field-count.php mysqli::$field_count
access:  public


[ Top ]

method query [line 184]

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 mysqli_stmt::bind_param.
  1.  => integer
  2.  => double
  3.  => string
  4.  => blob
mixed   $param1   (optional) Bind parameter 1
mixed   $param2,...   (optional) Bind parameter 2 ..

[ Top ]

method seek [line 233]

boolean seek( integer $offset)

Adjusts the result pointer to an arbitrary row in the result



Tags:

access:  public


Parameters:

integer   $offset   Must be between zero and the total number of rows minus one

[ Top ]

method set_charset [line 141]

bool set_charset( string $char)

Set character set of current database



Tags:

return:  The name of character set that is supported on database
access:  public


Parameters:

string   $char   name of character set that supported from database

[ Top ]

method trend [line 412]

void trend( [bool $v = true])

DB transaction 을 종료한다.



Tags:

access:  public


Parameters:

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

[ Top ]

method trstart [line 398]

void trstart( )

DB transaction 을 시작한다.



Tags:

access:  public


[ Top ]


Documentation generated on Tue, 14 May 2019 01:59:53 +0900 by phpDocumentor 1.4.4