I have a table that stores the setting and its value what is the best way to retreve the values form the database?
Settings table is set out like this:
setting value
host 1.2.3.4
port 1234
user me
pass cake
Eg:
$host = $db->query('SELECT value FROM settings where setting = "host" ');
print $host;
I am Using PDO
This is the recommended way now to react with database.