PHP and MySQL/MS-SQL

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
quadoc
Forum Contributor
Posts: 137
Joined: Fri Jul 01, 2005 5:33 pm
Location: Atlanta, GA

PHP and MySQL/MS-SQL

Post by quadoc »

I've a web page written in PHP and MySql. Could someone tells me if I can convert it to use MS-SQL instead of MySQL? What is involve? Thanks...
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

I highly doubt Microsoft has anything built into their database to allow them to read directly from other databases. There are two things I can think of:

1) Make a mysqldump and try to import that into MSSQL - I've never done it, but it might work.
2) Write some code to manually get all the data from your MySQL database and dump it in a (CSV) text file. Then, write some more code that reads from that text file and dumps it into MSSQL (or just write one page to go direct).

1 question - why are you going from MySQL (champion of the people) to MSSQL (public enemy #1 through #27). Needless to say, I'm completely objective :)
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
quadoc
Forum Contributor
Posts: 137
Joined: Fri Jul 01, 2005 5:33 pm
Location: Atlanta, GA

Post by quadoc »

Thanks for the tips pickle.

And I completely agreed with your question. But it wasn't my choice to convert from MySQL (champion of the people) to MSSQL (public enemy #1 through #27). :)
Post Reply