Active Record Query - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Active Record Query (/showthread.php?tid=6142) |
Active Record Query - El Forum - 02-15-2008 [eluser]Unknown[/eluser] Hello, I'm new to CI and so far I'm loving it. I really want to use the Active record part of CI and for the most part I figured it out. This last query is givng me a little bit of trouble. Would realliy apreciate any help. SQL Code: SELECT vb_user. * , vb_userfield. * , sum( vb_UserPoints.Points ) AS points CI Code Code: $CI =& get_instance(); Error: Quote:An Error Was Encountered I understand the error, but I'm not sure on how to get the SUM function to work. Active Record Query - El Forum - 02-16-2008 [eluser]Seppo[/eluser] How about this? Code: $CI->db->select_sum('UserPoints.Points', 'points'); Active Record Query - El Forum - 02-16-2008 [eluser]Unknown[/eluser] Yea I figured that out last night. Missed that part in the docs. Thanks though! |