PHP/MySQL Database/odbc prepare

Материал из Web эксперт
Перейти к: навигация, поиск

odbc_prepare(): query must be "prepared."

 
Its syntax is: int odbc_prepare (int connection_ID, string query)
<?
$connect = @odbc_connect("myAccessDB", "user", "secret") or die("Could not connect to ODBC database");
$query = "UPDATE myTable set id = \"1\" WHERE 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);
?>