• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Active records BETWEEN x and y

#1
[eluser]elfbaba[/eluser]
Please how can i convert the below sql active record format

Code:
SELECT * FROM table WHERE t BETWEEN '2010-11-29' AND '2010-12-29'

#2
[eluser]Eric Barnes[/eluser]
How about:
Code:
$this->db->from('table')->where('t >=', '2010-11-29')->where('t <=', '2010-12-29');
or
Code:
$this->db->from('table')->where('t BETWEEN "2010-11-29" AND "2010-12-29"');

#3
[eluser]elfbaba[/eluser]
Thanks, let me try it


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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