Well this is a great example of why storing php timestamps is not a great idea in a mysql database. You should really have converted the timestamp to a MYSQL date and stored it in a datetime or date data type column, and then it would have been a lot easier.
However, you are where you are, so you need to do something like:
$this->db->from('tbl_name')
->where('user_id', $user_id)
->where('time >', $timestamp)
->get();
$timestamp is the php timestamp for the date you want, ie yesterday at midnight (I presume you want, not just the previous 48 or 24 hour period).
To get the $timestamp you would just do some php date manipulation something like as described here:
Get timestamp of today and yesterday in php
Or something like:
$timestamp = strtotime('yesterday midnight');
EDIT:
I may have misunderstood your question. On second reading you seem to be asking how do you (having read an entries timestamp from your database) know if it is yesterday or today?
This has already been answered PHP How to find the time elapsed since a date time? and Finding the number of days between two dates