(PHP 4, PHP 5, PHP 7, PHP 8)
odbc_exec — Directly execute an SQL statement
odbc_exec(Odbc\Connection $odbc, string $query): Odbc\Result|false
Sends an SQL statement to the database server.
odbcThe ODBC connection object, see odbc_connect() for details.
queryThe SQL statement.
Returns an ODBC result object if the SQL command was executed successfully, or false on error.
| Version | Description |
|---|---|
| 8.4.0 | odbc expects an Odbc\Connection instance now; previously, a resource was expected. |
| 8.4.0 | This function returns an Odbc\Result instance now; previously, a resource was returned. |
| 8.0.0 | flags was removed. |
© 1997–2025 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/function.odbc-exec.php