Welcome Guest, Not a member yet? Register   Sign In
Setting in database
#1

[eluser]EEssam[/eluser]
Hello,

I have the following code in my old app to get settings from DB:

// get global settings
$result = mysql_query("SELECT varname, value FROM setting");

if (!$result)
{
die ('Could not successfully get settings from DB: ' . mysql_error());
}

$options = array();

while ($row = mysql_fetch_assoc($result))
{
$options[$row['varname']] = $row['value'];
}

mysql_free_result($result);

What would be the ideal method to integrate it with CI?

Please advise.


Messages In This Thread
Setting in database - by El Forum - 06-11-2008, 08:41 AM
Setting in database - by El Forum - 06-11-2008, 09:01 AM
Setting in database - by El Forum - 06-11-2008, 09:17 AM
Setting in database - by El Forum - 06-11-2008, 09:29 AM
Setting in database - by El Forum - 06-17-2008, 07:53 PM
Setting in database - by El Forum - 06-17-2008, 08:33 PM
Setting in database - by El Forum - 06-17-2008, 08:59 PM



Theme © iAndrew 2016 - Forum software by © MyBB