Welcome Guest, Not a member yet? Register   Sign In
problem with where clause!!!
#1

[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!!!


Messages In This Thread
problem with where clause!!! - by El Forum - 01-29-2011, 05:55 PM
problem with where clause!!! - by El Forum - 01-29-2011, 06:17 PM
problem with where clause!!! - by El Forum - 01-29-2011, 06:19 PM



Theme © iAndrew 2016 - Forum software by © MyBB