How to execute mysql datediff in phql

Hi,

Can anyone please suggest me how to execute the below query with phalcon sql ?

mysql> SELECT DATEDIFF('2015-03-11','2015-01-12') AS days;

This way:

$data = $this->db->fetchOne("SELECT DATEDIFF('2015-03-11', '2015-01-12') AS days");


3.1k

Hi,

Thanks, I will update it.

Raja K