function odbc_exec() accomplishes the roles of both odbc_prepare() and odbc_execute(). : odbc_exec « MySQL Database « PHP






function odbc_exec() accomplishes the roles of both odbc_prepare() and odbc_execute().

 
Its syntax is: int odbc_exec (int connection_ID, string query)

<?
$connect = @odbc_connect("myAccessDB", "user", "secret") or die("Could not connect to ODBC database!");
$query = "SELECT * FROM customers";
$result = odbc_exec($connect, $query) or die("Couldn't execute query!");
odbc_close($connect);
?>
  
  








Related examples in the same category