odbc_do

resource odbc_do(resource conn, string query) 
conn Connection ID
query SQL statement

Executes a SQL statement.

Returns:

Result identifier; FALSE on error

Description:

Executes a query on a database as specified by the connection ID. This is an alias for odbc_execute().

Version:

Existing since version 3.0.6

Example:

Execute SQL
$db = odbc_connect("DSN","user","pass"); 
$result = odbc_do($db,"SELECT FirstName, LastName FROM Employees ORDER BY LastName"); 

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.