略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: ibase_prepare

2024-12-22

ibase_prepare

(PHP 5, PHP 7 < 7.4.0)

ibase_preparePrepare a query for later binding of parameter placeholders and execution

说明

ibase_prepare(string $query): resource
ibase_prepare(resource $link_identifier, string $query): resource
ibase_prepare(resource $link_identifier, string $trans, string $query): resource

Prepare a query for later binding of parameter placeholders and execution (via ibase_execute()).

参数

query

An InterBase query.

link_identifier

An InterBase link identifier returned from ibase_connect(). If omitted, the last opened link is assumed.

trans

An InterBase transaction handle the query should be associated with. If omitted, the default transaction of the connection is assumed.

返回值

Returns a prepared query handle, or false on error.

add a noteadd a note

User Contributed Notes 2 notes

up
8
Andrew Champ
6 years ago
<?php

/**
* EDIT TO ABOVE: The above mentions "ibase_fetch_object". 
* In that case if should be using the object operator.
* Example below.
*/

$query = "SELECT * FROM EMPLOYEES";
$p_sql = ibase_prepare($query);
$result = ibase_execute($p_sql);
while(
$row = ibase_fetch_object($result)){
echo
$row->FIRSTNAME;
}
up
-5
adamson dot ibus at gmail dot com
9 years ago
ex.

<?php
$query
= "SELECT * FROM EMPLOYEES";
$p_sql = ibase_prepare($query);
$result = ibase_execute($p_sql);
while(
$row = ibase_fetch_object($result)){
echo
$row['FIRSTNAME'];
}

官方地址:https://www.php.net/manual/en/function.ibase-prepare.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3