成人精品一区二区三区中文字幕-成人精品一区二区三区-成人精品一级毛片-成人精品亚洲-日本在线视频一区二区-日本在线视频免费

導(dǎo)航首頁 ? 技術(shù)教程 ? PHP:pg_send_execute()的用法_PostgreSQL函數(shù)
全站頭部文字 我要出現(xiàn)在這里
PHP:pg_send_execute()的用法_PostgreSQL函數(shù) 710 2023-12-12   

pg_send_execute

(PHP 5 >= 5.1.0)

pg_send_execute — Sends a request to execute a prepared statement with given parameters, without waiting for the result(s).

說明

bool pg_send_execute ( resource $connection , string $stmtname , array $params )

Sends a request to execute a prepared statement with given parameters, without waiting for the result(s).

This is similar to pg_send_query_params(), but the command to be executed is specified by naming a previously-prepared statement, instead of giving a query string. The function's parameters are handled identically to pg_execute(). Like pg_execute(), it will not work on pre-7.4 versions of PostgreSQL.

參數(shù)

connection

PostgreSQL database connection resource. When connection is not present, the default connection is used. The default connection is the last connection made by pg_connect() or pg_pconnect().

stmtname

The name of the prepared statement to execute. if "" is specified, then the unnamed statement is executed. The name must have been previously prepared using pg_prepare(), pg_send_prepare() or a PREPARE SQL command.

params

An array of parameter values to substitute for the $1, $2, etc. placeholders in the original prepared query string. The number of elements in the array must match the number of placeholders.

返回值

Returns TRUE on success, FALSE on failure. Use pg_get_result() to determine the query result.

范例

Example #1 Using pg_send_execute()

<?php
  $dbconn = pg_connect("dbname=publisher") or die("Could not connect");

  // Prepare a query for execution
  if (!pg_connection_busy($dbconn)) {
    pg_send_prepare($dbconn, "my_query", 'SELECT * FROM shops WHERE name = $1');
    $res1 = pg_get_result($dbconn);
  }

  // Execute the prepared query.  Note that it is not necessary to escape
  // the string "Joe's Widgets" in any way
  if (!pg_connection_busy($dbconn)) {
    pg_send_execute($dbconn, "my_query", array("Joe's Widgets"));
    $res2 = pg_get_result($dbconn);
  }
  
  // Execute the same prepared query, this time with a different parameter
  if (!pg_connection_busy($dbconn)) {
    pg_send_execute($dbconn, "my_query", array("Clothes Clothes Clothes"));
    $res3 = pg_get_result($dbconn);
  }
  
?>

參見

pg_prepare() - Submits a request to create a prepared statement with the given parameters, and waits for completion. pg_send_prepare() - Sends a request to create a prepared statement with the given parameters, without waiting for completion. pg_execute() - Sends a request to execute a prepared statement with given parameters, and waits for the result.


主站蜘蛛池模板: 狗年电影| 超越演员表| 浙江卫视节目在线观看直播| 重温经典频道节目表| 生死劫电影| 欲海情缘| 成年人看的小视频| 有冈大贵| 性感男模| cctv5+体育赛事直播时间| 玛姬·格蕾斯| 山楂树之恋电影剧情简介| 《纯真年代》| 百字明咒标准读诵慢念| 日日拍夜夜拍| 电视剧暗夜与黎明剧情介绍| 嫦娥奔月读后感50字| 男人天堂视频| 公公媳妇电影| 朱敏荷《豺狼来了》| 《荷塘月色》课文| 性欧洲高跟长靴靴交视频| 富贵不能淫翻译| 无圣光_尤果网__秀人网_| 保镖 电影在线观看 完整版| 春江花月夜理解性默写及答案| city of stars歌词| 我们的故事 电视剧| 米娅华希科沃斯卡| 布莱克·莱弗利身高体重| 禁忌爱游戏| 美女网站在线观看| footjob videos| 欧美变态sososo另类| 邓佳佳| 荆棘花| 欧美gv网站| 八年级上册三峡| 大姐大| department什么意思| 2025微信头像最新版本|

!!!站長長期在線接!!!

網(wǎng)站、小程序:定制開發(fā)/二次開發(fā)/仿制開發(fā)等

各種疑難雜癥解決/定制接口/定制采集等

站長微信:lxwl520520

站長QQ:1737366103