• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using Native MySQL Functions With Active Record

#1
[eluser]MCrittenden[/eluser]
I'm having some trouble mixing Active Record and MySQL functions. I'm just trying to
Code:
SELECT * FROM 'sometable' WHERE DATE('datetime_column') = CURDATE()

In other words, I only want to select items whose date (found in the 'datetime_column') is equal to today's date. Can I throw a standard MySQL function (like 'DATE()') into $this->db-where()? If so, what's the syntax? Quotations around the MySQL functions? Nothing seems to be working for me.

Or is there some other way to do this? I'm just trying to avoid $this->db->query() in favor of more strict active record.

Thanks!


Messages In This Thread
Using Native MySQL Functions With Active Record - by El Forum - 06-24-2008, 08:35 AM
Using Native MySQL Functions With Active Record - by El Forum - 06-24-2008, 08:50 AM
Using Native MySQL Functions With Active Record - by El Forum - 06-24-2008, 10:36 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.