I have a problem in processing and comparing time of each row in my tables. I want to get the result from database which are just created in the last seven days but the problem is the data saved in the database are saved using now() format and are like this :1497867945 ; I really don't know how to deal with it. well I received this database as it is and should give back the PHP codes based on the database. I would appreciate your help. The array used to save data in database including the time is as follow :
$update=array(
'title'=>$this->input->post('post_name'),
'text'=>$this->input->post('post_body'),
'img'=>$image,
'time'=>now(),
'cat_id'=>$this->input->post('post_cat')
);