PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access Driver] Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'., SQL state 37000 in SQLExecDirect in d:\inetpub\wwwroot\add.php on line 13
Looks like the only queries I can make in ODBC with the Microsoft Access Driver are those shown above
$user_odbc = "user";
$pass_odbc = "pass";
$database_odbc = "clientsDB";
$connect_db = odbc_connect($database_odbc,$user_odbc,$pass_odbc) or die ('Wrong Command!!!');
$query = "SELECT * FROM websites";
$result_odbc = odbc_exec($connect_db,$query);
$i = 0;
while (odbc_fetch_row($result_odbc)) {
++$i;
}
odbc_close($connect_db);
echo 'The number of rows in Table "websites" is '.$i;
It probably wont work faultlessly no doubt although I see no reason why not....