Microsoft Word - Core PHP Programming Using PHP to Build Dynamic Web Sites

(singke) #1

Use ibase_field_info to get information about a column in a result set. An associative
array is returned containing the following elements: alias, length, name, relation,
type.


boolean ibase_free_query(integer query)


Use ibase_free_query to free memory associated with a prepared query.


boolean ibase_free_result(integer result)


Use ibase_free_result to free memory associated with a result set.


integer ibase_num_fields(integer result)


The ibase_num_fields function returns the number of fields in a result set.


ibase_pconnect(string path, string user, string password,
string character_set)


The ibase_pconnect function works similarly to ibase_connect. The difference is that
connections are not closed by PHP or by your script. They persist with the server process
to be reused when later script executions need identical connections.


integer ibase_prepare(string query) integer
ibase_prepare(integer link, string query)


Use ibase_prepare to prepare a query for later execution with ibase_execute. If you
leave out the link argument, the last-opened link will be used. A query identifier is
returned.


integer ibase_query(string query, value bind, ...) integer
ibase_query(integer link, string query, value bind, ...)


The ibase_query function executes a query on an open connection. You may skip the
link identifier, causing the last-opened connection to be used. If the query contains?
placeholders, you must match them with bind values that follow the query argument. A
result identifier is returned. It is used with functions such as ibase_fetch_row.


<?
//connect to database
if(!($dbLink = ibase_connect("mydatabase.gdb", "leon", "secret"))
{
print("Unable to connect!
\n");
exit();
}

Free download pdf