odbc_execute

PHP 4, PHP 5, PHP 7, PHP 8
odbc_execute - Execute a prepared statement
Manual
Code Examples

odbc_execute( resource$statement, [array$params = []] ): bool

Executes a statement prepared with odbc_prepare.

Parameters

statement

The result id resource, from odbc_prepare.

params

Parameters in params will be substituted for placeholders in the prepared statement in order. Elements of this array will be converted to strings by calling this function.

Any parameters in params which start and end with single quotes will be taken as the name of a file to read and send to the database server as the data for the appropriate placeholder.

If you wish to store a string which actually begins and ends with single quotes, you must add a space or other non-single-quote character to the beginning or end of the parameter, which will prevent the parameter from being taken as a file name. If this is not an option, then you must use another mechanism to store the string, such as executing the query directly with odbc_exec).

Return Values

Returns true on success or false on failure.

Related Functions

Example of odbc_execute

Show all examples for odbc_execute

PHP Version: