[eluser]Thomas Edwards[/eluser]
Having an issue with connecting to a database, usual message:
"Unable to connect to your database server using the provided settings."
If I use a standard script, like so, it connects fine and gets data.
Code:
<?php
DEFINE (DB_USER, "username");
DEFINE (DB_PASSWORD, "password");
DEFINE (DB_HOST, "localhost");
DEFINE (DB_NAME, "database");
$db_connection = mysql_connect (DB_HOST, DB_USER, DB_PASSWORD);
mysql_select_db (DB_NAME);
$query = "SELECT * FROM stories";
$result = mysql_db_query (DB_NAME, $query, $db_connection);
while ($row = mysql_fetch_array($result)) {
echo 'entry';
}
?>
However, pop the same working settings into CI and it always returns that error. Any ideas?