function _DatabaseHandler::get_variable

4.x _DatabaseHandler.php _DatabaseHandler::get_variable($name, $default_value = "")
5.x _DatabaseHandler.php _DatabaseHandler::get_variable($name, $default_value = "")

Retrieve a value from the variables table.

Parameters

string $name:

File

classes/_DatabaseHandler.php, line 859

Class

_DatabaseHandler

Code

function get_variable($name, $default_value = "") {
  $res = $this->db_query("SELECT value FROM variables
	                         WHERE name = '?' ", $name);
  $cur = $this->db_fetch_array($res);

  $val = $cur ["value"];
  if ($val == "") {
    $val = $default_value;
  }

  return $val;
}