By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,066 Members | 1,841 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,066 IT Pros & Developers. It's quick & easy.

ODBC, MySQL & PHP

P: n/a
Hi,

I am trying to update data from a Lotus Notes Database to a MySQL via
ODBC and always get a currupted table. Since I want to update only a
certain set of the data, I first write the necessary data from the OBDC
into a temp table, then delete the old data from the target table and
copy the new data from the temp into the targe table. I have no IDs in
the lotus notes table so thats the only way I think I can do that.

I am running the query with

odbc_connect(...)
then
odbc_exec(...)
then
While (odbc_fetch_row(...)) {
....

[here is a query that takes the row with odbc_results and writes then
into a temp table.]
....

}

then I do a
odbc_close(...)

now I delete from the target
then insert all the data from the temp to the target
Drop the temp table.

In the end, the targe table always has a wrong number of records etc.
I am ussuming that since the ODBC call takes quite some time, that this
might be an issue. Can it be that the php script continues running down
the script while the ODBC is still working? How can I assure that
everything is running step by step instead of simultaneous in case?

thanks

Oliver

Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.