Welcome Guest, Not a member yet? Register   Sign In
ActiveRecord, MySQL with DATE_SUB ... how?
#4

[eluser]hugle[/eluser]
[quote author="InsiteFX" date="1254710020"]
Code:
SELECT DATE_SUB('1998-01-02', INTERVAL 31 DAY);

Enjoy
InsiteFX[/quote]

actually I did try you approach in many ways.. but didn't realize how it should be doneSad

I just found out the solution, I just needed to replace the order like:
Code:
$this->db->where('`razrabotki`.`created` > DATE_SUB(CURDATE(),INTERVAL 30 DAY)');

Thanks ! Smile
cheers!


Messages In This Thread
ActiveRecord, MySQL with DATE_SUB ... how? - by El Forum - 10-04-2009, 11:12 AM
ActiveRecord, MySQL with DATE_SUB ... how? - by El Forum - 10-04-2009, 03:33 PM
ActiveRecord, MySQL with DATE_SUB ... how? - by El Forum - 10-04-2009, 04:20 PM
ActiveRecord, MySQL with DATE_SUB ... how? - by El Forum - 10-04-2009, 04:39 PM
ActiveRecord, MySQL with DATE_SUB ... how? - by El Forum - 10-04-2009, 04:44 PM
ActiveRecord, MySQL with DATE_SUB ... how? - by El Forum - 10-06-2009, 04:25 PM



Theme © iAndrew 2016 - Forum software by © MyBB