Is there a way to use this method, while also getting data from a MSSQL table, and inserting or updating MySQL ?? I'm guessing not.
I have another situation that does:
insert into MySQL_Stage...wp_users
select fld1, fld2,fld3
from MSSQL_Database..MyTable
I could do the SELECT into variables, then run similar code to what you suggested above.
Edit: That's what I did, which works.