Hi, I'm doing a php operation with parentheses; and I get this error
error code:
Fatal error: Unsupported operand types in
C:\xampp\htdocs\olPrueba2\application\controllers\Admin.php on line 705
A PHP Error was encountered
Severity: Error
Message: Unsupported operand types
Filename: controllers/Admin.php
Line Number: 705
Backtrace:
this is the line that says to have an error:
$u=($yearC-$Yhire_date)*12;
How can I solve it, the variables I take from the database with a method, is it a date type for that?
code of the method:
public function getyearHire($roster_salesforcename){
$this->db->select('roster_hire_date');
$this->db->where('roster_salesforcename', $roster_salesforcename);
$this->db->group_by('YEAR(roster_hire_date)');
$data = $this->db->get('ol_roster');
$response = $data->result();
return $response;
}