This topic is locked

Change from mySQL to SQL Server 2005

1/9/2009 11:57:28 AM
PHPRunner General questions
N
nbrennan author

So my company is changing everything from mySQL to SQL Server 2005 (I know, I think its the wrong direction, but its not my call). We have a bunch of things written in phpRunner5 for mySQL, and changing the Database over to MSSQL instead removes all custom code, all references to tables, etc.
Is there an easy way to get phprunner to keep all of the information, and then I can just go in and fix the custom code myself? That is to say, have phpRunner automatically change all of the calls to the database over to SQL Server calls, and leave my custom code and references to tables the same?
For example, when I change to the SQL database, I have to recheck which tables I want to use, which fields I want to use, which table is the login table, the reports disappear, the custom code disappears, etc.

P
phprookie 1/9/2009

So my company is changing everything from mySQL to SQL Server 2005 (I know, I think its the wrong direction, but its not my call). We have a bunch of things written in phpRunner5 for mySQL, and changing the Database over to MSSQL instead removes all custom code, all references to tables, etc.

Is there an easy way to get phprunner to keep all of the information, and then I can just go in and fix the custom code myself? That is to say, have phpRunner automatically change all of the calls to the database over to SQL Server calls, and leave my custom code and references to tables the same?
For example, when I change to the SQL database, I have to recheck which tables I want to use, which fields I want to use, which table is the login table, the reports disappear, the custom code disappears, etc.


Hmm... Here's what I would try.
Leave the project as is using mySQL and create a new project using the new MSSQL 2005 db connection.
Then try swapping out the <project>\include\dbcommon.php and <project>\dbconnection.php files from the new project to the old. Back up your original files of course <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=36677&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />

P
phprookie 1/9/2009

I forgot MSSQL db connection also has the following as well
<project>\include\dbconnection.mssql.win.php

<project>\include\dbconnection.mssql.unix.php

J
Jane 1/12/2009

Hi,
PHPRunner do not convert settings if you change database.

You can do it manually editing project file in any text editor. Find and modify all SQL queries and connectinon string for this purpose.