Welcome Guest, Not a member yet? Register   Sign In
Database Connection Accross a Network
#2

[eluser]polaris1927[/eluser]
I had configured the database class in the autoload.php file as follows:

Code:
$autoload['libraries'] = array('database');

Removing the class from the autoload.php file and attempting to connect to the database from the controller using:

Code:
function index()
{
    $conn = mssql_connect('srv03', 'pbx', 'pbx');

    mssql_select_db('BusinessDirectory', $conn);

    $r = mssql_query('Select * from Business_names', $conn);

    while ( $row = mssql_fetch_array ( $r ) )
    {
        echo $row['name'] . '<br>';
    }    

}

worked.

So, there seems to be a problem with the autoload.php and the database library?


Messages In This Thread
Database Connection Accross a Network - by El Forum - 03-14-2008, 09:56 AM
Database Connection Accross a Network - by El Forum - 03-14-2008, 10:40 AM
Database Connection Accross a Network - by El Forum - 03-14-2008, 11:52 AM
Database Connection Accross a Network - by El Forum - 03-14-2008, 12:54 PM
Database Connection Accross a Network - by El Forum - 03-14-2008, 12:58 PM
Database Connection Accross a Network - by El Forum - 03-14-2008, 02:05 PM
Database Connection Accross a Network - by El Forum - 03-14-2008, 02:40 PM



Theme © iAndrew 2016 - Forum software by © MyBB