This topic is locked

db change

4/7/2009 2:42:57 PM
PHPRunner General questions
D
danaci author

hi everybody,
I have 2 db.(ex. sales2008m and sales2009) and two db same tables.

how to change with code sales2008<=>sales2009 db?

is it possible?
thnx.

Sergey Kornilov admin 4/7/2009

Check include/dbcommon.php file. This is the place where you can change database name, MySQL username/password etc.

D
danaci author 4/7/2009

Check include/dbcommon.php file. This is the place where you can change database name, MySQL username/password etc.


dear admin,

when is running program with code change db?

Sergey Kornilov admin 4/7/2009

You need to rephrase your question. I don't get it.

D
danaci author 4/7/2009

You need to rephrase your question. I don't get it.


dear admin,
I have two databases and this databases contains same tables.
db1 tables

table_a

table_b

table_c
db2 tables

table_a

table_b

table_c

I want o create button and if user click this button change db1 to db2 or db2 to db1.

Sergey Kornilov admin 4/8/2009

You cannot do this in the current version however it will be possible in final version of PHPRunner 5.1.

hichem 4/9/2009

You cannot do this in the current version however it will be possible in final version of PHPRunner 5.1.


The only reasons I can think of to have such a feature would be for backup purposes? In that case I personally don't think it is best suited to provide users with a button, rather allow 'behind the scenes' the application to connect to a second replica database if its current connection times out, that way it is transparent to the user.

If you offer users a button to switch to the backup for example, they won't notice or revert back to the primary DB if thats what is expected from them so I'd personally think it's a nice feature for the PHPR generated application to do automatically <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=39979&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />

Good to see such nice feature though even if redundancy can be achieved at the backend by clustering the database. may be there is another use case for this functionality that I am missing?

Thanks
Hich