DB_common::autoExecute() (Previous) (Next) DB_common::commit()

View this page in Last updated: Sun, 17 Aug 2008
English | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Plain HTML

DB_common::autoPrepare()

DB_common::autoPrepare() --  指定した変数に基づいて、 INSERT 文あるいは UPDATE 文を準備する

説明

SQL の INSERT 文あるいは UPDATE 文を自動的に組み立て、 execute() あるいは executeMultiple() で使用できるようにします。

パラメータ

string $table

テーブルの名前。

array $table_fields

フィールド名を含む配列。

これらのフィールドには ? プレースホルダが 割り当てられることに中いしましょう。そのため、 execute() で渡すデータは、現在の DBMS の 要求に応じて自動的にエスケープおよびクォートが行われます。

integer $mode

作成するクエリの型 (DB_AUTOQUERY_INSERT あるいは DB_AUTOQUERY_UPDATE)。

string $where

WHERE 句に使用する文字列。 $modeDB_AUTOQUERY_UPDATE の場合にのみ使用されます。 この文字列は直接クエリに組み込まれます。そのため、DBMS の規約に 従ってリテラルのエスケープおよびクォートを行う必要があります。

返り値

resource - クエリのリソースハンドル、あるいは失敗した場合に DB_Error オブジェクトを返します。

注意

この関数は、スタティックにコールする ことはできません。

DB_common::autoExecute() (Previous) (Next) DB_common::commit()

Download Documentation Last updated: Sun, 17 Aug 2008
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.