« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 278 for conn (0.002 sec.)
mysqlndプラグインの開発をはじめよう | PHP 8.3 8354
mysqlndプラグインの開発をはじめよう mysqlnd プラグイン それ自体が PHP拡張モジュール であることを覚えておくことが重要です。 次のコードは、典型的な mysqlnd プラグインで使われる MINIT 関数の基本構造を示します。 /* my_php_mysqlnd_plugin.c */ st ... * globals, ini entries, resources, classes */ /* register mysqlnd plugin */ mysqlnd_plugin_id = mysqlnd_plugin_register(); conn_m = mysqlnd_get_conn_methods(); memcpy(org_conn_m, conn_m, sizeof(struct st_mysqlnd_conn_methods)); conn_m->query = MYSQLN ... D_METHOD(mysqlnd_plugin_conn, query); conn_m->connect = MYSQLND_METHOD(mysqlnd_plugin_conn, connect); } /* my_mysqlnd_plugin.c */ enum_func_status MYSQ ... LND_METHOD(mysqlnd_plugin_conn, query)(/* ... */) { /* ... */ } enum_func_status MYSQLND_METHOD(mysqlnd_plugin_conn, connect)(/* ... */) { /* ... */ } タ ...
https://man.mtool.work/php/8.3/mysqlnd.plugin.developing.html
oci_bind_by_name — Oracle プレースホルダに PHP 変数をバインドする | PHP 8.3 7917
oci_bind_by_name (PHP 5, PHP 7, PHP 8, PECL OCI8 >= 1.1.0) oci_bind_by_name — Oracle プレースホルダに PHP 変数をバインドする 説明 function oci_bind_by_name ( resource $statement , string $param , mixed &$var , int $max_length = -1 , int $ty ... _by_name() によるデータの挿入 <?php // このようなテーブルを作ります // CREATE TABLE mytab (id NUMBER, text VARCHAR2(40)); $conn = oci_connect ( 'hr' , 'welcome' , 'localhost/XE' ); if (! $conn ) { $m = oci_error (); trigger_error ( htmlentities ( $m ... [ 'message' ]), E_USER_ERROR ); } $stid = oci_parse ( $conn , "INSERT INTO mytab (id, text) VALUES(:id_bv, :text_bv)" ); $id = 1 ; $text = "Data to insert " ; oci_bind_by_name ( $sti ... o insert ' ?> 例2 一度組み立てたものを複数回実行 <?php // このようなテーブルを作ります // CREATE TABLE mytab (id NUMBER); $conn = oci_connect ( 'hr' , 'welcome' , 'localhost/XE' ); if (! $conn ) { $m = oci_error (); trigger_error ( htmlentities ( $m ...
https://man.mtool.work/php/8.3/function.oci-bind-by-name.html
oci_fetch_array — クエリの次の行を連想配列あるいは数値添字配列で返す | PHP 8.3 7850
oci_fetch_array (PHP 5, PHP 7, PHP 8, PECL OCI8 >= 1.1.0) oci_fetch_array — クエリの次の行を連想配列あるいは数値添字配列で返す 説明 function oci_fetch_array ( resource $statement , int $mode = OCI_BOTH | OCI_RETURN_NULLS ): array | false ク ... 。そうしなければ、PHP からはひとつのカラムだけしか見えなくなります。 例 例1 oci_fetch_array() での OCI_BOTH の使用例 <?php $conn = oci_connect ( 'hr' , 'welcome' , 'localhost/XE' ); if (! $conn ) { $e = oci_error (); trigger_error ( htmlentities ( $e ... [ 'message' ], ENT_QUOTES ), E_USER_ERROR ); } $stid = oci_parse ( $conn , 'SELECT department_id, department_name FROM departments' ); oci_execute ( $stid ); while (( $row = oci_fetch_array ( $st ... o $row [ 1 ] . " and " . $row [ 'DEPARTMENT_NAME' ] . " are the same<br>\n" ; } oci_free_statement ( $stid ); oci_close ( $conn ); ?> 例2 oci_fetch_array() での OCI_NUM の使用例 <?php /* 実行する前にテーブルを作成します。 CREATE TABLE mytab (id NUMBE ...
https://man.mtool.work/php/8.3/function.oci-fetch-array.html
例 | PHP 8.3 7695
例 これらの例では HR として接続しています。 これは、Oracle データベースに付属するサンプルのスキーマ "Human Resources" 用のユーザーです。このユーザーを使うには、 ユーザーのロックを解除してパスワードをリセットしなければなりません。 このサンプ ... 本的なクエリ ここでは、クエリの結果を表示させます。OCI8 のステートメントは 準備-実行-フェッチ という手順をとります。 <?php $conn = oci_connect ( 'hr' , 'welcome' , 'localhost/XE' ); if (! $conn ) { $e = oci_error (); trigger_error ( htmlentities ( $e ... [ 'message' ], ENT_QUOTES ), E_USER_ERROR ); } // 文を準備します $stid = oci_parse ( $conn , 'SELECT * FROM departments' ); if (! $stid ) { $e = oci_error ( $conn ); trigger_error ( htmlentities ( $e [ 'message' ] ... _QUOTES ) : "&nbsp;" ) . "</td>\n" ; } print "</tr>\n" ; } print "</table>\n" ; oci_free_statement ( $stid ); oci_close ( $conn ); ?> 例2 バインド変数を用いた挿入 バインド変数を使うと、実行コンテキストをキャッシュして再利用できるので パフォーマンスが ...
https://man.mtool.work/php/8.3/oci8.examples.html
db2_set_option — 接続リソースあるいはステートメントリソースのオプションを設定す... 7636
db2_set_option (PECL ibm_db2 >= 1.0.0) db2_set_option — 接続リソースあるいはステートメントリソースのオプションを設定する 説明 function db2_set_option ( resource $resource , array $options , int $type ): bool ステートメントリソースあるいは接 ... オプションを設定することはできません。 パラメータ resource db2_prepare() が返す有効なステートメントリソースか、 あるいは db2_connect() や db2_pconnect() が返す有効な接続リソース。 options ステートメントあるいは接続のオプションを含む連想配列。 このパラメ ... me = 'localhost' ; $port = 50000 ; $protocol = 'TCPIP' ; $username = 'db2inst1' ; $password = 'ibmdb2' ; /* 接続文字列 */ $conn_string = "DRIVER={IBM DB2 ODBC DRIVER};DATABASE= $database ;" ; $conn_string .= "HOSTNAME= $hostname ;PORT= $port ;PROTOCO ... L= $protocol ;" ; $conn_string .= "UID= $username ;PWD= $password ;" ; /* 接続リソースを取得します */ $conn = db2_connect ( $conn_string , '' , '' ...
https://man.mtool.work/php/8.3/function.db2-set-option.html
cubrid_drop — Delete an instance using OID | PHP 8.3 7472
cubrid_drop (PECL CUBRID >= 8.3.0) cubrid_drop — Delete an instance using OID 説明 function cubrid_drop ( resource $conn_identifier , string $oid ): bool The cubrid_drop() function is used to delete an instance from database by using the oi ... d of the instance. パラメータ conn_identifier Connection identifier. oid Oid of the instance that you want to delete. 戻り値 成功した場合に true を、失敗した ... 場合に false を返します。 例 例1 cubrid_drop() example <?php $conn = cubrid_connect ( "localhost" , 33000 , "demodb" ); @ cubrid_execute ( $conn , "DROP TABLE foo" ); cubrid_execute ( $conn ... , "CREATE TABLE foo(a int AUTO_INCREMENT, b set(int), c list(int), d char(10))" ); cubrid_execute ( $conn , "INSERT INTO foo(a, b, c, d) VALUES(1, {1,2,3}, {11,22,33,333}, 'a')" ); cubrid_execute ( $conn , "INSERT INTO foo(a, b, ...
https://man.mtool.work/php/8.3/function.cubrid-drop.html
cubrid_lock_write — Set a write lock on the given OID | PHP 8.3 7413
cubrid_lock_write (PECL CUBRID >= 8.3.0) cubrid_lock_write — Set a write lock on the given OID 説明 function cubrid_lock_write ( resource $conn_identifier , string $oid ): bool The cubrid_lock_write() function is used to put write lock on t ... he instance pointed by the given oid . パラメータ conn_identifier Connection identifier. oid OID of the instance that you want to put write lock on. 戻り値 成功した場合に true を ... 、失敗した場合に false を返します。 例 例1 cubrid_lock_write() example <?php $conn = cubrid_connect ( "localhost" , 33000 , "demodb" , "dba" ); @ cubrid_execute ( $conn , "DROP TABLE foo" ); cubrid_execute ... ( $conn , "CREATE TABLE foo(a int AUTO_INCREMENT, b set(int), c list(int), d char(10))" ); cubrid_execute ( $conn , "INSERT INTO f ...
https://man.mtool.work/php/8.3/function.cubrid-lock-write.html
cubrid_lock_read — Set a read lock on the given OID | PHP 8.3 7065
cubrid_lock_read (PECL CUBRID >= 8.3.0) cubrid_lock_read — Set a read lock on the given OID 説明 function cubrid_lock_read ( resource $conn_identifier , string $oid ): bool The cubrid_lock_read() function is used to put read lock on the ins ... tance pointed by given oid . パラメータ conn_identifier Connection identifier. oid OID of the instance that you want to put read lock on. 戻り値 成功した場合に true を ... 、失敗した場合に false を返します。 例 例1 cubrid_lock_read() example <?php $conn = cubrid_connect ( "localhost" , 33000 , "demodb" , "dba" ); @ cubrid_execute ( $conn , "DROP TABLE foo" ); cubrid_execute ... ( $conn , "CREATE TABLE foo(a int AUTO_INCREMENT, b set(int), c list(int), d char(10))" ); cubrid_execute ( $conn , "INSERT INTO f ...
https://man.mtool.work/php/8.3/function.cubrid-lock-read.html
cubrid_lob2_write — Write to a lob object | PHP 8.3 7036
cubrid_lob2_write (PECL CUBRID >= 8.4.1) cubrid_lob2_write — Write to a lob object 説明 function cubrid_lob2_write ( resource $lob_identifier , string $buf ): bool The cubrid_lob2_write() function reads as much as data from buf and stores i ... true を、失敗した場合に false を返します。 例 例1 cubrid_lob2_write() example 1 <?php // test_lob (id INT, contents CLOB) $conn = cubrid_connect ( "localhost" , 33000 , "demodb" , "dba" , "" ); cubrid_execute ( $conn , "DROP TABLE if exists test_lob" ... ); cubrid_execute ( $conn , "CREATE TABLE test_lob (id INT, contents CLOB)" ); $req = cubrid_prepare ( $conn , "INSERT INTO test_lob VALUES(2, ?)" ) ... ; $lob = cubrid_lob2_new ( $conn , 'CLOB' ); $len = cubrid_lob2_write ( $lob , "Hello world" ); cubrid_lob2_bind ( $req , 1 , $lob ); cubrid_execute ( $req ...
https://man.mtool.work/php/8.3/function.cubrid-lob2-write.html
cubrid_rollback — Roll back a transaction | PHP 8.3 6977
cubrid_rollback (PECL CUBRID >= 8.3.0) cubrid_rollback — Roll back a transaction 説明 function cubrid_rollback ( resource $conn_identifier ): bool The cubrid_rollback() function executes rollback on the transaction pointed by conn_identifie ... r , currently in progress. Connection to server is closed after calling cubrid_rollback() . Connection handle, however, is still valid. パラメータ conn_id ... entifier Connection identifier. 戻り値 成功した場合に true を、失敗した場合に false を返します。 例 例1 cubrid_rollback() example <?php ... $conn = cubrid_connect ( "127.0.0.1" , 33000 , "demodb" , "dba" ); cubrid_set_autocommit ( $conn , false ); @ cubrid_execute ( $ ...
https://man.mtool.work/php/8.3/function.cubrid-rollback.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT