Welcome Guest, Not a member yet? Register   Sign In
codeigniter active record bug?
#5

[eluser]danmontgomery[/eluser]
Tried this locally and both queries work fine for me, I think your problem is something else.

Code:
$this->load->database();
$res = $this->db->select("some_data, DATE_FORMAT(start_date, '%d %b, %Y'), DATE_FORMAT(end_date, '%d %b, %Y')", false)->get('test_table')->result();
echo "<xmp>";
foreach($res as $row){
    echo print_r($row, true);
}
echo "</xmp>";

Quote:stdClass Object
(
[some_data] => Test data A
[DATE_FORMAT(start_date, '%d %b, %Y')] => 14 Jan, 2010
[DATE_FORMAT(end_date, '%d %b, %Y')] => 14 Jan, 2010
)
stdClass Object
(
[some_data] => Test data B
[DATE_FORMAT(start_date, '%d %b, %Y')] => 14 Jan, 2010
[DATE_FORMAT(end_date, '%d %b, %Y')] => 14 Jan, 2010
)
stdClass Object
(
[some_data] => Test data C
[DATE_FORMAT(start_date, '%d %b, %Y')] => 14 Jan, 2010
[DATE_FORMAT(end_date, '%d %b,%Y')] => 14 Jan, 2010
)
stdClass Object
(
[some_data] => Test data D
[DATE_FORMAT(start_date, '%d %b, %Y')] => 14 Jan, 2010
[DATE_FORMAT(end_date, '%d %b, %Y')] => 14 Jan, 2010
)


Messages In This Thread
codeigniter active record bug? - by El Forum - 01-13-2010, 09:58 AM
codeigniter active record bug? - by El Forum - 01-13-2010, 10:55 AM
codeigniter active record bug? - by El Forum - 01-13-2010, 08:30 PM
codeigniter active record bug? - by El Forum - 01-13-2010, 08:33 PM
codeigniter active record bug? - by El Forum - 01-14-2010, 09:56 AM
codeigniter active record bug? - by El Forum - 01-14-2010, 10:20 AM
codeigniter active record bug? - by El Forum - 01-14-2010, 10:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB