Welcome Guest, Not a member yet? Register   Sign In
How to resolv mutil database connect which is diffenet db type?
#4

[eluser]chmod[/eluser]
[quote author="inparo" date="1210281436"]By passing in the TRUE you're telling CI to return the database object. $this->db will still reference the old version.

Code:
$msdb = $this->load->database($config,TRUE);
$query = $msdb->get(’baseinfo’);
if ($query->num_rows() > 0)
    {
    foreach ($query->result() as $row)
    {
        echo $row->password;
    }
}
Information on connecting to several databases is at the bottom of this page.

And just out of curiosity, why do you have two vastly different databases?[/quote]



why the database is vastly different?

i am making the web-service which is using SOAP for payment API.
as the differert company using different database.so
the web service server will check the db type.
if the db type is ms sql server,i will use mssql driver to call the
stored process .and the stored process will return the result to
soap client.then output to users and loging in mysql database;

if the db type is mysql ,i will use mysql driver to call the
stored process.and the stored process will return the result to
soap client.then output to users and loging in mysql database;

and so on .


Messages In This Thread
How to resolv mutil database connect which is diffenet db type? - by El Forum - 05-08-2008, 07:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB