Execute query with odbc_execute(). : odbc_execute « MySQL Database « PHP






Execute query with odbc_execute().

 
Its syntax is: int odbc_execute (int result_ID [, array parameters])

<?
$connect = @odbc_connect("myAccessDB", "user", "secret") or die("Could not connect to ODBC database");
$query = "UPDATE customers set cust_id = \"Inc.\" WHERE cust_id \"2\"";
$result = odbc_prepare($connect, $query) or die("Couldn't prepare query!");
$result = odbc_execute($result) or die("Couldn't execute query!");
odbc_close($connect);
?>
  
  








Related examples in the same category