« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 40 for dbconn (0.001 sec.)
pg_send_execute — 指定したパラメータでプリペアドステートメントを実行するリクエ... 12637
pg_send_execute (PHP 5 >= 5.1.0, PHP 7, PHP 8) pg_send_execute — 指定したパラメータでプリペアドステートメントを実行するリクエストを 送信し、その結果を待たない 説明 function pg_send_execute ( PgSql\Connection $connection , string $statement_ ... 待するようになりました。 これより前のバージョンでは、 resource を期待していました。 例 例1 pg_send_execute() の使用法 <?php $dbconn = pg_connect ( "dbname=publisher" ) or die( "Could not connect" ); // 実行するクエリを準備する if (! pg_connection_busy ( ... $dbconn )) { pg_send_prepare ( $dbconn , "my_query" , 'SELECT * FROM shops WHERE name = $1' ); $res1 = pg_get_result ( $dbconn ); ... // プリペアドクエリを実行する。 文字列 "Joe's Widgets" は // エスケープの必要がないことに注意 if (! pg_connection_busy ( $dbconn )) { pg_send_execute ( $dbconn , "my_query" , array( "Joe's Widgets" )); $res2 = pg_get_result ( $dbconn ); } // 同じプリペ ...
https://man.mtool.work/php/8.3/function.pg-send-execute.html
pg_send_prepare — 指定したパラメータでプリペアドステートメントを作成するリクエ... 12450
pg_send_prepare (PHP 5 >= 5.1.0, PHP 7, PHP 8) pg_send_prepare — 指定したパラメータでプリペアドステートメントを作成するリクエストを 送信し、その結果を待たない 説明 function pg_send_prepare ( PgSql\Connection $connection , string $statement_ ... 待するようになりました。 これより前のバージョンでは、 resource を期待していました。 例 例1 pg_send_prepare() の使用法 <?php $dbconn = pg_connect ( "dbname=publisher" ) or die( "Could not connect" ); // 実行するクエリを準備する if (! pg_connection_busy ( ... $dbconn )) { pg_send_prepare ( $dbconn , "my_query" , 'SELECT * FROM shops WHERE name = $1' ); $res1 = pg_get_result ( $dbconn ); ... } // プリペアドクエリを実行する。文字列 "Joe's Widgets" は // エスケープの必要がないことに注意 if (! pg_connection_busy ( $dbconn )) { pg_send_execute ( $dbconn , "my_query" , array( "Joe's Widgets" )); $res2 = pg_get_result ( $dbconn ); } // 同一プリペ ...
https://man.mtool.work/php/8.3/function.pg-send-prepare.html
pg_set_error_context_visibility — pg_last_error() | PHP 8.3 10578
pg_set_error_context_visibility (PHP 8 >= 8.3.0) pg_set_error_context_visibility — pg_last_error() が返すコンテクストのエラーメッセージのアクセス権を設定する 説明 function pg_set_error_context_visibility ( PgSql\Connection $connection , int ... CONTEXT_NEVER , PGSQL_SHOW_CONTEXT_ERRORS , PGSQL_SHOW_CONTEXT_ALWAYS 例 例1 pg_set_error_context_visibility() の例 <?php $dbconn = pg_connect ( "dbname=publisher" ) or die( "Could not connect" ); if (! pg_connection_busy ( $dbconn )) { pg_send_query ( ... $dbconn , "select * from doesnotexist;" ); } pg_set_error_context_visibility ( $dbconn , PGSQL_SHOW_CONTEXT_ALWAYS ); $res1 = pg_g ... et_result ( $dbconn ); echo pg_result_error ( $res1 ); ?> 参考 pg_last_error() - 特定の接続から直近のエラーメッセージ文字列を取得する pg_resul ...
https://man.mtool.work/php/8.3/function.pg-set-error-context-visibility.html
pg_cancel_query — 非同期クエリを取り消す | PHP 8.3 10079
pg_cancel_query (PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8) pg_cancel_query — 非同期クエリを取り消す 説明 function pg_cancel_query ( PgSql\Connection $connection ): bool pg_cancel_query() は、 pg_send_query() ・ pg_send_query_params() あるいは pg ... を期待するようになりました。 これより前のバージョンでは、 resource を期待していました。 例 例1 pg_cancel_query() の例 <?php $dbconn = pg_connect ( "dbname=publisher" ) or die( "Could not connect" ); if (! pg_connection_busy ( $dbconn )) { pg_send_query ( ... $dbconn , "select * from authors; select count(*) from authors;" ); } $res1 = pg_get_result ( $dbconn ); echo "First call to pg_ge ... ds\n\n" ; // 実行中のクエリをキャンセルする。もしまだ実行中なら、2 番目のクエリが // 対象となるだろう。 pg_cancel_query ( $dbconn ); ?> 上の例の出力は以下となります。 First call to pg_get_result(): Resource id #3 Resource id #3 has 3 records 参考 pg_se ...
https://man.mtool.work/php/8.3/function.pg-cancel-query.html
pg_get_result — 非同期クエリの結果を取得する | PHP 8.3 9798
pg_get_result (PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8) pg_get_result — 非同期クエリの結果を取得する 説明 function pg_get_result ( PgSql\Connection $connection ): PgSql\Result | false pg_get_result() は、 pg_send_query() , pg_send_query_params( ... スを期待するようになりました。 これより前のバージョンでは、 resource を期待していました。 例 例1 pg_get_result() の例 <?php $dbconn = pg_connect ( "dbname=publisher" ) or die( "Could not connect" ); if (! pg_connection_busy ( $dbconn )) { pg_send_query ( ... $dbconn , "select * from authors; select count(*) from authors;" ); } $res1 = pg_get_result ( $dbconn ); echo "First call to pg_ge ... t_result(): $res1 \n" ; $rows1 = pg_num_rows ( $res1 ); echo " $res1 has $rows1 records\n\n" ; $res2 = pg_get_result ( $dbconn ); echo "Second call to pg_get_result(): $res2 \n" ; $rows2 = pg_num_rows ( $res2 ); echo " $res2 has $rows2 records\n" ; ...
https://man.mtool.work/php/8.3/function.pg-get-result.html
pg_set_error_verbosity — pg_last_error() | PHP 8.3 9298
pg_set_error_verbosity (PHP 5 >= 5.1.0, PHP 7, PHP 8) pg_set_error_verbosity — pg_last_error() および pg_result_error() が返すメッセージの詳細度を指定する 説明 function pg_set_error_verbosity ( PgSql\Connection $connection = ? , int $verbos ... るようになりました。 これより前のバージョンでは、 resource を期待していました。 例 例1 pg_set_error_verbosity() の例 <?php $dbconn = pg_connect ( "dbname=publisher" ) or die( "Could not connect" ); if (! pg_connection_busy ( $dbconn )) { pg_send_query ( ... $dbconn , "select * from doesnotexist;" ); } pg_set_error_verbosity ( $dbconn , PGSQL_ERRORS_VERBOSE ); $res1 = pg_get_result ( $d ...
https://man.mtool.work/php/8.3/function.pg-set-error-verbosity.html
pg_send_query — 非同期クエリを送信する | PHP 8.3 9205
pg_send_query (PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8) pg_send_query — 非同期クエリを送信する 説明 function pg_send_query ( PgSql\Connection $connection , string $query ): int | bool pg_send_query() は、 connection に非同期クエリを送信します。 ... スを期待するようになりました。 これより前のバージョンでは、 resource を期待していました。 例 例1 pg_send_query() の例 <?php $dbconn = pg_connect ( "dbname=publisher" ) or die( "Could not connect" ); if (! pg_connection_busy ( $dbconn )) { pg_send_query ( ... $dbconn , "select * from authors; select count(*) from authors;" ); } $res1 = pg_get_result ( $dbconn ); echo "First call to pg_ge ... t_result(): $res1 \n" ; $rows1 = pg_num_rows ( $res1 ); echo " $res1 has $rows1 records\n\n" ; $res2 = pg_get_result ( $dbconn ); echo "Second call to pg_get_result(): $res2 \n" ; $rows2 = pg_num_rows ( $res2 ); echo " $res2 has $rows2 records\n" ; ...
https://man.mtool.work/php/8.3/function.pg-send-query.html
pg_result_error_field — エラー報告の各フィールドを返す | PHP 8.3 8799
pg_result_error_field (PHP 5 >= 5.1.0, PHP 7, PHP 8) pg_result_error_field — エラー報告の各フィールドを返す 説明 function pg_result_error_field ( PgSql\Result $result , int $field_code ): string | false | null pg_result_error_field() は、 r ... するようになりました。 これより前のバージョンでは、 resource を期待していました。 例 例1 pg_result_error_field() の例 <?php $dbconn = pg_connect ( "dbname=publisher" ) or die( "Could not connect" ); if (! pg_connection_busy ( $dbconn )) { pg_send_query ( ... $dbconn , "select * from doesnotexist;" ); } $res1 = pg_get_result ( $dbconn ); echo pg_result_error_field ( $res1 , PGSQL_DIAG_SQ ...
https://man.mtool.work/php/8.3/function.pg-result-error-field.html
pg_result_error — 結果に関連するエラーメッセージを取得する | PHP 8.3 8799
pg_result_error (PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8) pg_result_error — 結果に関連するエラーメッセージを取得する 説明 function pg_result_error ( PgSql\Result $result ): string | false pg_result_error() は、結果インスタンス ( result )に関連し ... を期待するようになりました。 これより前のバージョンでは、 resource を期待していました。 例 例1 pg_result_error() の例 <?php $dbconn = pg_connect ( "dbname=publisher" ) or die( "接続できませんでした" ); if (! pg_connection_busy ( $dbconn )) { pg_send_quer ... y ( $dbconn , "select * from doesnotexist;" ); } $res1 = pg_get_result ( $dbconn ); echo pg_result_error ( $res1 ); ?> 参考 pg_result_ ...
https://man.mtool.work/php/8.3/function.pg-result-error.html
基本的な使用法 | PHP 8.3 8799
基本的な使用法 この例では、PostgreSQL への接続・クエリの実行・結果の表示 そして切断の方法を説明します。 例1 PostgreSQL 拡張モジュールの概要 <?php // 接続し、データベースを選択する $dbconn = pg_connect ( "host=localhost dbname=publishing use ... Could not connect: ' . pg_last_error ()); // SQL クエリを実行する $query = 'SELECT * FROM authors' ; $result = pg_query ( $dbconn , $query ) or die( 'Query failed: ' . pg_last_error ()); // 結果を HTML で表示する echo "<table>\n" ; while ( $line = pg_f ... "\t</tr>\n" ; } echo "</table>\n" ; // 結果セットを解放する pg_free_result ( $result ); // 接続をクローズする pg_close ( $dbconn ); ?> 他のマニュアルの関連ページ DuckDB PostgreSQL Extension DuckDB PostgreSQL Import DuckDB PostgreSQL Compatibility Duck ...
https://man.mtool.work/php/8.3/pgsql.examples-basic.html
PREV 1 2 3 4 NEXT