Mssql and mysqli
Posted on 2010-09-13
I am trying to connect to ms sql server to retrieve data and then insert into mysql.
However, for some reason, I am getting double the amount of insert into mysql. Instead of 37 records, there are 74 records. It seem like it is going through the while loop twice. What is going on?
//connect to mssql
$link = mssql_connect('localhost','user','password');
$sql = "select * from table1";
$query = mssql_query($sql);
$mysqli = new mysqli('testjhost', 'tester', 'password!', 'customer');
while ($result = mssql_fetch_array($query))
$insert = "insert into table10 (...) value (...)";