This topic is locked

Multi database support

4/22/2010 5:27:18 AM
PHPRunner General questions
B
BenjaminJ author

Hello,
I have a huge problem. We have developped a project with PHPRunner using more than 50 tables.

It was created in our company using MySQL for several weeks now.

Our first customers are running MySQL too and are very satisfied with the interface and all functionnalities provided.
But the project must imperatively be installed and configured to run with SQLServer and PostgreSQL!!

I thought it was not a problem since PHPRunner supports those databases.
But, when I go back to the connection screen and switch to one of the other databases installed on the server, none of the tables are recognised in the "Tables" screen.

And none of the views, reports and charts are displayed! So the project is completely broken!
I think the problem is that PHPRunners doesn't match the table names since it reads PostgreSQL & SQLServer tables with a prefix ("public" & "dbo").

I cannot avoid this project to run with multiple databases, and I cannot create multiple projects for maintenance and evolution reasons!
Please show me the way to have this running... It is very very important!

Thanks in advance,

Benj.

500481 4/22/2010



Hello,
I have a huge problem. We have developped a project with PHPRunner using more than 50 tables.

It was created in our company using MySQL for several weeks now.

Our first customers are running MySQL too and are very satisfied with the interface and all functionnalities provided.
But the project must imperatively be installed and configured to run with SQLServer and PostgreSQL!!

I thought it was not a problem since PHPRunner supports those databases.
But, when I go back to the connection screen and switch to one of the other databases installed on the server, none of the tables are recognised in the "Tables" screen.

And none of the views, reports and charts are displayed! So the project is completely broken!
I think the problem is that PHPRunners doesn't match the table names since it reads PostgreSQL & SQLServer tables with a prefix ("public" & "dbo").

I cannot avoid this project to run with multiple databases, and I cannot create multiple projects for maintenance and evolution reasons!
Please show me the way to have this running... It is very very important!

Thanks in advance,

Benj.


Hi, my english is very bad to write.
I had the same problem with Postgresql. You must do is that script of creation of the database, he is without quotation marks, and that you do not create the tables with the name of the scheme. For example:
Table 1:

Create table Dep

(

CodDep Char(2) NOT NULL UNIQUE,

NomDep Char(56) NOT NULL,

primary key (CodDep)

) Without Oids;
Query String 1:
Select CodDep, NomDep from Dep;
Table 2:

Create table "Dep"

(

"CodDep" Char(2) NOT NULL UNIQUE,

"NomDep" Char(56) NOT NULL,

primary key ("CodDep")

) Without Oids;
Query String 2:
Select "CodDep", "NomDep" from "public"."Dep";
In both cases, the table is equal, but at the time of creating a query string, the syntax changes and is complicated with the format of the second table.
Of this I am safe using Postgresql, I do not know SQL Server, but it must be by something similar.
I hope to have been of aid in your problem.
Mauricio Zea

Sergey Kornilov admin 4/22/2010

Switching databases may not be possible in some cases even if you do it right. There are some database-specific settings in PHPRunner like field types that will not convert seamlessly.
If you still want to switch I can recommend the following approach. Build two test projects that use the same database table in MySQL and PostgreSQL. Leave all default settings. Open project files in any text editor and compare them using tool like WinMerge.
This way you can see what's different between MySQL and PostgreSQL projects which can help you with manual migration.