CodeIgniter Forums
Help with DB query - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: Help with DB query (/showthread.php?tid=11793)

Help with DB query - El Forum - 09-23-2008

Hello again,

i need perform this part of sql query with activerecord

SELECT b_articles.*, b_users.*, b_menus.*, COUNT(b_comments.c_id) FROM b_articles, b_users, b_menus, b_comments
but if i try
$this->db->select('articles, users, menus, COUNT(comments)')
for tables i have prefix 'b_' configured in database.php

How can i select all columns from three tables and 1 COUNT column from fourth table??

Thanks for help