This topic is locked

Link login to a diffrent database

8/1/2008 01:21:29
PHPRunner General questions
G
GhOsT author

Hi im trying to take the logins from a table in a diffrent database , any ideas??
ty in advanced
yours

GhOsT

J
Jane 8/1/2008

Hi,
unfrotunately you can't use two database in one PHPRunner project.

As workaround you can edit login.php file manually. This may involve a bit of coding.

However we don't have a ready to go solution for this.

T
thesofa 8/1/2008

Have you considered just adding the tables to the existing database, instead of creating a new one?

That allows you to use the login data from the original database, you need not incorporate any of the new tables into the old database applications.
BTW, you can address another database from within your application, you need to hard code ot yourself tho

to access a field from the SAME database in an application, you use the following syntax

`table_name`.`field_name`
to access a field from another database, say base2, try this

`base2`.`table_name`.`field_name`
You may have to write another $conn string, say$conn2, and make a connection to the other database hand coded too.

Worth playing with, but maybe just adding the tables to the existing database will be the better solution.

G
GhOsT author 8/1/2008

Thank you both for your replies , unfortanetly adding the table into the databse isnt an option , how ever i will try to hardcode it in, ty the sofa for pointing out to me that "trick" (i cant believ i forgot , after 1 day of trouble by trying to add a "dot" in a tablename)
welll ill give it a shot and post results back , for anyone who might want to know how its done.
Yours

GhOsT