ibase_name_result Assigns a name to a result set php函数


ibase_name_result

(PHP 5)

ibase_name_resultAssigns a name to a result set

说明

bool ibase_name_result ( resource $result , string $name )

This function assigns a name to a result set. This name can be used later in UPDATE|DELETE ... WHERE CURRENT OF name statements.

参数

result

An InterBase result set.

name

The name to be assigned.

返回值

成功时返回 TRUE, 或者在失败时返回 FALSE.

范例

Example #1 ibase_name_result() example

<?php
$result 
ibase_query("SELECT field1,field2 FROM table FOR UPDATE");
ibase_name_result($result"my_cursor");

$updateqry ibase_prepare("UPDATE table SET field2 = ? WHERE CURRENT OF my_cursor");

for (
$i 0ibase_fetch_row($result); ++$i) {
    
ibase_execute($updateqry$i);
}
?>

参见

  • ibase_prepare() - Prepare a query for later binding of parameter placeholders and execution
  • ibase_execute() - Execute a previously prepared query



相关阅读:
ibase_num_fields Get the number of fields in a result set
ibase_num_params Return the number of parameters in a prepared query
ibase_param_info Return information about a parameter in a prepared query
ibase_pconnect Open a persistent connection to an InterBase database
ibase_prepare Prepare a query for later binding of parameter placeholders and execution
ibase_query Execute a query on an InterBase database
ibase_restore Initiates a restore task in the service manager and returns immediately
ibase_rollback Roll back a transaction
ibase_rollback_ret Roll back a transaction without closing it
ibase_server_info Request information about a database server
ibase_service_attach Connect to the service manager
ibase_service_detach Disconnect from the service manager
ibase_set_event_handler Register a callback function to be called when events are posted
ibase_timefmt Sets the format of timestamp, date and time type columns returned from queries
快速导航

Copyright © 2016 phpStudy |