[eluser]immi[/eluser]
Hi
I am making a page which display videos on controller i added microtime(true) for table field 'lastwatch'. I want to grab the records on a page where lastwatch is lower than 300 seconds but it makes me error
Code:
function sqldiff($time){
return $time - microtime(true);
}
$data["q"] = $this->db->query("SELECT * from vid_info where sqldiff(lastwatch)< 100 order by lwatch desc")->num_rows();
I get this error
Quote:A Database Error Occurred
Error Number: 1305
FUNCTION mujrahome.sqldiff does not exist
SELECT * from vid_info where sqldiff(lastwatch)<= 100 order by lwatch desc
KINDLY HELP!!!