public function getSiteValues($value) {
$this->db->select(
'site',
'id, option_name, option_value',
NULL,
'option_name=' . $value
); // database, what to take, where value
$res = $this->db->getResult();
echo '<pre>';
print_r($res);
echo '</pre>';
}
In this case I would like to put for example:
getSiteValues('sitename')
and so that this would return the value of sitename row and from option_value column, but it keep giving me error such as
[0] => Unknown column 'sitename' in 'where clause'
What can I do to fix this?
PS. I have tried to look at other solutions but they have keep giving me wrong solutions. I have tried most of them. btw I am using this crud library - https://github.com/rorystandley/MySQL-CRUD-PHP-OOP for db connections