1
Hi...i have this query where i have two tables mydepartments (xoops database) and department (msaccess database)
what i would like to do is to compare both of the tables and insert new data to xoops table from ms access table
how do i combine this two queries together ?
le="color: #000000"><?php $sql= "INSERT INTO ".$xoopsDB->prefix("mydepartments")."(`DEPTID`, `DEPTNAME`) SELECT DEPTID,DEPTNAME FROM DEPARTMENTS AS o WHERE o.DEPTID NOT IN (SELECT DEPTID FROM ".$xoopsDB->prefix("mydepartments").")";
right now in xoops i reveive departments tables not exist error
i used odbc to connect to msaccess database
le="color: #000000"><?php $conn=odbc_connect('mydata','',''); if (!$conn) {exit("Connection Failed: " . $conn);} $sql="SELECT DEPTID,DEPTNAME FROM DEPARTMENTS"; $rs=odbc_exec($conn,$sql); if (!$rs) {exit("Error in SQL");}
thank you in advance for any input