How to find active and expired users, compare dates in Codeigniter?

Tablename :- userinfo
Column :- expiration [ type:- text ]
Date format :- date('d M Y')
Database :- MySQL
Tech :- Codeigniter 3

Table contains record of users and I want to filter result through expiration date.

Active users :- $exp_date > $cur_date;
Expired users :- $exp_date < $cur_date;

Use OR to get the "Unlimited" value:

$this->db->where('expiration <', $cur_date); // for expired users
$this->db->where('expiration >', $cur_date); // for active users
$this->db->or_where('expiration', $unlimited_value); // or_where