CodeIgniter Forums
MSSQL Active Record - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: MSSQL Active Record (/showthread.php?tid=28892)



MSSQL Active Record - El Forum - 03-24-2010

[eluser]robert.fulcher[/eluser]
I have run into a weird little behavior that I am not sure how to fix.

This does not work
Code:
$query = $this->db->query("SELECT * FROM Patient");

This does work
Code:
$query = $this->db->query("SELECT fname, lname, ssn FROM Patient");

also with active record

this does not work
Code:
$query = $this->db->get('Patient');

this does work
Code:
$query = $this->db->select('fname, lname, ssn');
        $query = $this->db->get('Patient');

Any thoughts on why? Checked the sql that is produced and they all produce valid queries.

Thanks