ODBC, MySQL & PHP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Oliver Spiesshofer

    #1

    ODBC, MySQL & PHP

    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

Working...