0
I want to change get_where to mysql or PDO, but I don’t know! Help ...!
public function get_where($table = '', $where = NULL, $limit = NULL, $offset = NULL)
{
if ($table !== '')
{
$this->from($table);
}
if ($where !== NULL)
{
$this->where($where);
}
if ( ! empty($limit))
{
$this->limit($limit, $offset);
}
$result = $this->query($this->_compile_select());
$this->_reset_select();
return $result;
}
I need help to change:
$this->db->get_where('settings' , array('type' => 'site_name'))->row()->description;
for PDO.
I changed the following information in the database
Table: Settings;
type => option_name;
site_name => title
Description => option_value
What you know about SQL?
– Woss
In theory (Obs: describing how it works) nothing, but in practice I turn to thirty and it ends up working a lot, but the question itself is not relevant in question of the published subject. Anyway, could you help me?
– Mr. Jeferson
I even tried to risk putting like this: $db->query('SELECT option_value FROM Settings WHERE array("option_name" => "title") DESC'); however, it did not work
– Mr. Jeferson
There seems to be some more settings in this class, only with this code there is no way to know. Some error appears?
– rray
The SQL syntax is independent of PHP and is entirely relevant to the question. Start by reading the basics of the language before trying to do anything. Remember that working is not the same as being right. Maybe this will get you started: link
– Woss
Um, well, you could set me up with $db->query('SELECT option_value FROM Settings WHERE array("option_name" => "title") DESC');
– Mr. Jeferson
That’s some kind of framework?
– rray
is not a framework
– Mr. Jeferson