EC-CUBE
Public メソッド | 変数
クラス MDB2_Result_Common
MDB2_Result_Commonに対する継承グラフ
Inheritance graph
[凡例]
MDB2_Result_Commonのコラボレーション図
Collaboration graph
[凡例]

Public メソッド

 __construct (&$db, &$result, $limit=0, $offset=0)
 MDB2_Result_Common (&$db, &$result, $limit=0, $offset=0)
 setResultTypes ($types)
 seek ($rownum=0)
fetchRow ($fetchmode=MDB2_FETCHMODE_DEFAULT, $rownum=null)
 fetchOne ($colnum=0, $rownum=null)
 fetchCol ($colnum=0)
 fetchAll ($fetchmode=MDB2_FETCHMODE_DEFAULT, $rekey=false, $force_array=false, $group=false)
 rowCount ()
 numRows ()
 nextResult ()
 getColumnNames ($flip=false)
 _getColumnNames ()
 numCols ()
 getResource ()
 bindColumn ($column, &$value, $type=null)
 _assignBindColumns ($row)
 free ()

変数

 $db
 $result
 $rownum = -1
 $types = array()
 $values = array()
 $offset
 $offset_count = 0
 $limit
 $column_names

コンストラクタとデストラクタ

__construct ( &$  db,
&$  result,
limit = 0,
offset = 0 
)

Constructor


関数

_assignBindColumns ( row)

Bind a variable to a value in the result row.

引数:
arrayrow data
戻り値:
mixed MDB2_OK on success, a MDB2 error on failure

private

Retrieve the names of columns returned by the DBMS in a query result.

戻り値:
mixed Array variable that holds the names of columns as keys or an MDB2 error on failure. Some DBMS may not return any columns when the result set does not contain any rows.

private

MDB2_Result_mysql, と MDB2_Result_pgsqlで再定義されています。

bindColumn ( column,
&$  value,
type = null 
)

Set bind variable to a column.

引数:
intcolumn number or name
mixedvariable reference
stringspecifies the type of the field
戻り値:
mixed MDB2_OK on success, a MDB2 error on failure

public

fetchAll ( fetchmode = MDB2_FETCHMODE_DEFAULT,
rekey = false,
force_array = false,
group = false 
)

Fetch and return all rows from the current row pointer position

引数:
int$fetchmodethe fetch mode to use: + MDB2_FETCHMODE_ORDERED + MDB2_FETCHMODE_ASSOC + MDB2_FETCHMODE_ORDERED | MDB2_FETCHMODE_FLIPPED + MDB2_FETCHMODE_ASSOC | MDB2_FETCHMODE_FLIPPED
boolif set to true, the $all will have the first column as its first dimension
boolused only when the query returns exactly two columns. If true, the values of the returned array will be one-element arrays instead of scalars.
boolif true, the values of the returned array is wrapped in another array. If the same key value (in the first column) repeats itself, the values will be appended to this array instead of overwriting the existing values.
戻り値:
mixed data array on success, a MDB2 error on failure

public

参照:
getAssoc()
fetchCol ( colnum = 0)

Fetch and return a column from the current row pointer position

引数:
int|stringthe column number (or name) to fetch
戻り値:
mixed data array on success, a MDB2 error on failure public
fetchOne ( colnum = 0,
rownum = null 
)

fetch single column from the next row from a result set

引数:
int|stringthe column number (or name) to fetch
intnumber of the row where the data can be found
戻り値:
string data on success, a MDB2 error on failure public
& fetchRow ( fetchmode = MDB2_FETCHMODE_DEFAULT,
rownum = null 
)

Fetch and return a row of data

引数:
inthow the array data should be indexed
intnumber of the row where the data can be found
戻り値:
int data array on success, a MDB2 error on failure

public

MDB2_Result_mysql, と MDB2_Result_pgsqlで再定義されています。

free ( )

Free the internal resources associated with result.

戻り値:
bool true on success, false if result is invalid

public

MDB2_Result_mysql, と MDB2_Result_pgsqlで再定義されています。

getColumnNames ( flip = false)

Retrieve the names of columns returned by the DBMS in a query result or from the cache.

引数:
boolIf set to true the values are the column names, otherwise the names of the columns are the keys.
戻り値:
mixed Array variable that holds the names of columns or an MDB2 error on failure. Some DBMS may not return any columns when the result set does not contain any rows.

public

return the resource associated with the result object

戻り値:
resource

public

MDB2_Result_Common ( &$  db,
&$  result,
limit = 0,
offset = 0 
)

PHP 4 Constructor

Move the internal result pointer to the next available result

戻り値:
true on success, false if there is no more result set or an error object on failure

public

MDB2_Result_pgsqlで再定義されています。

numCols ( )

Count the number of columns returned by the DBMS in a query result.

戻り値:
mixed integer value with the number of columns, a MDB2 error on failure

public

MDB2_Result_mysql, と MDB2_Result_pgsqlで再定義されています。

numRows ( )

Returns the number of rows in a result object

戻り値:
mixed MDB2 Error Object or the number of rows

public

MDB2_BufferedResult_mysql, と MDB2_BufferedResult_pgsqlで再定義されています。

rowCount ( )

Returns the actual row number that was last fetched (count from 0)

戻り値:
int

public

seek ( rownum = 0)

Seek to a specific row in a result set

引数:
intnumber of the row where the data can be found
戻り値:
mixed MDB2_OK on success, a MDB2 error on failure

public

MDB2_BufferedResult_mysql, と MDB2_BufferedResult_pgsqlで再定義されています。

setResultTypes ( types)

Define the list of types to be associated with the columns of a given result set.

This function may be called before invoking fetchRow(), fetchOne(), fetchCol() and fetchAll() so that the necessary data type conversions are performed on the data to be retrieved by them. If this function is not called, the type of all result set columns is assumed to be text, thus leading to not perform any conversions.

引数:
arrayvariable that lists the data types to be expected in the result set columns. If this array contains less types than the number of columns that are returned in the result set, the remaining columns are assumed to be of the type text. Currently, the types clob and blob are not fully supported.
戻り値:
mixed MDB2_OK on success, a MDB2 error on failure

public


このクラスの説明は次のファイルから生成されました:
 全て データ構造 ネームスペース 関数 変数