How to generate sql query from query builder if I have function like this?
PHP Code:
public function get_user_by_email($email)
{
$this->where('email', $email);
return $this->first();
}
Also on CI3 if I have error on my generated SQL, it will show the generated query while on CI4 it only show the mysqli_sql_exception without the SQL query. How can I show the sql query everytime I have error with query builder?