Good day all,
I have been working on a php script to pull information from an Access Database into MySQL locally on the webserver. Over the weekend the server (Cobalt RAQ4, running php4, MySQL 3.23.54) was upgraded with MyODBC and was declared by the server guru as being functioning.
HOWEVER...
I am getting an error on the script:
"Fatal error: Call to undefined function: odbc_connect() in /home/sites/home/web/test.php on line 3"
What I think this means is that PHP doesn't know the odbc_connect function. Is this a feature that has to be turned on or something?
The code I am using is:
<?php
$odbc = odbc_connect('testing.mdb','','');
$mysql = mysql_connect('localhost');
mysql_select_db ('testing', $mysql);
mysql_query('delete from testing');
$sql = "select * from testing";
$res = odbc_exec($odbc, $sql);
while (odbc_fetch_into($res,$row)) {
$flds = "'" . join("','" , $row) . "'";
$res1 = mysql_query("INSERT INTO testing VALUES ($flds)");
}
?>
The Access DB is called testing.mdb and has no username or password on it.
Before I close, the situation with having an AccessDB and pulling info into MySQL isnt the Ideal one, I know. However that is the situation I have been left with. 🙁
Phil
Any thoughts on this?