PHP and MS Sql

Associate
Joined
13 Nov 2003
Posts
1,567
Location
Manchester
Hi All

I have an app in php that we use to generate our stock/product lists.

We now have a new website in asp, and I need to insert the data from the PHP/Mysql system into an MS Sql database table.

Is there a way to do this from PHP.

I was thinking of a simple loop that reads the data from mysql and writes it to the MS Sql. Also, it needs to overwrite any existing data, however I don't want to empty the table first, as this would result in down time while the data was copying

Does anyone have any tips on the best way to do this?

Thanks
Aaron
 
Mr^B said:
I wouldn't even consider writing code for doing something so simple.

:)

Lol, trying to automate it all, so don't have to write csvs and import them, as it will be done 4 times a day
 
Also.. We need to be able to update the master list table in ms sql upto 4 times a day.

Now each time we update the master list needs to be cleared and all the data reenterd, as some products will have dissapeared and new ones will come in.

Whats the best way of doing this without taking the site down?

Thanks
A
 
Ok cool, will do that.

When you say 3 sets of queries, how do you tell it which to delete the old ones? What would you compare against. Would you insert the new data into a staging table, and then use that to perform comparisons?
 
Back
Top Bottom