I am having trouble with the following code segment. I am trying to update a table in a MySQL database with information from a MS Access database; however, it takes FOREVER to the point that it no longer responds. Furthermore, if I let it run no information is ever loaded into the MySQL database and is destroys my Access database. Anysuggestions or help?? Thanks in advance.
$odbc = odbc_connect('AccessPromoDB','','') or die("Connection to the Access database cannot be made.</BR>");
$mysql = mysql_connect('localhost','root','') or die("Connection to the MySQL databases cannot be made.</BR>");
mysql_select_db('PromoDB',$mysql);
$query = odbc_exec($odbc, "SELECT * FROM tblCUSTMaster") or die (odbc_errormsg());
while($row = odbc_fetch_array($query)){
$q = "INSERT INTO tblCUSTMaster (".
"custAddress,custCity,custEmail,custID,custName,custPhone,custState,custTMNumber,custType,custZip,custLastUpdated) ".
"VALUES (".
"'".$row['custAddress']."','".$row['custCity']."','".$row['custEmail']."','".$row['custID']."','".$row['custName']."','".$row['custPhone']."','".$row['custState']."','".$row['custTMNumber']."','".$row['custType']."','".$row['custZip']."','".$row['custLastUpdated']."') ";
odbc_exec($odbc,$q);
}//end of while loop
mysql_close($mysql);
odbc_close($odbc);