Firebird 2.0
PHP5 Programming
Manual

FBIRD_WAIT_EVENT

Purpose

Use the fbird_wait_event function to pause execution and wait for an event to occur.

Syntax

<wait_event> ::=
   fbird_wait_event( [ conn_hndl, ], <events> )

<events> ::=
     event
   | event, <events>


Element 
Type
Description
conn_hndl
resource
A valid connection handle
event
string
An event name (15 max)
<return>
string
Name of the received event

Semantics

The fbird_wait_event function suspends execution of the script until one of the specified events is posted by the database. This function accepts up to 15 event arguments.

If a connection handle is not provided, then the "default" connection will be used. The default connection is assigned every time you call fbird_connect or fbird_pconnect, so if you have multiple connections it will be whichever one was connected last.

The function returns the name of the event that was posted on success

Example

The below example code fragment waits for the event “DB_SHUTDOWN” on the default connection:

fbird_wait_event(“DB_SHUTDOWN”);



See also

fbird_set_event_handler


previous page goto index next page

Legal information