odbc_exec

(PHP 4, PHP 5, PHP 7, PHP 8)

odbc_execDirectly execute an SQL statement

说明

odbc_exec(Odbc\Connection $odbc, string $query): Odbc\Result|false

Sends an SQL statement to the database server.

参数

odbc

ODBC 连接对象,详见 odbc_connect()

query

The SQL statement.

返回值

返回 ODBC 结果对象 if the SQL command was executed successfully, or false on error.

更新日志

版本 说明
8.4.0 odbc 现在需要 Odbc\Connection 实例;之前需要 resource
8.4.0 此函数现在返回 Odbc\Result 实例;之前返回 resource
8.0.0 flags was removed.

参见