Welcome Guest, Not a member yet? Register   Sign In
How to convert from Mysql query to Codeigniter syntax?
#7

[eluser]Thorpe Obazee[/eluser]
[quote author="Phil Sturgeon" date="1245246172"]Why do a GROUP BY just to get a count in? This should do the same thing.

Code:
$this->db->join('lib_books', 'lib_books.boo_id = lib_borrowings.boo_id', 'inner');
$count=$this->db->count_all_results('lib_borrowings');
echo $count;
[/quote]

I believe he was trying to get some more information than but in the end, he actually didn't.


Messages In This Thread
How to convert from Mysql query to Codeigniter syntax? - by El Forum - 06-16-2009, 09:15 PM
How to convert from Mysql query to Codeigniter syntax? - by El Forum - 06-16-2009, 09:22 PM
How to convert from Mysql query to Codeigniter syntax? - by El Forum - 06-16-2009, 09:42 PM
How to convert from Mysql query to Codeigniter syntax? - by El Forum - 06-16-2009, 10:09 PM
How to convert from Mysql query to Codeigniter syntax? - by El Forum - 06-16-2009, 11:09 PM
How to convert from Mysql query to Codeigniter syntax? - by El Forum - 06-17-2009, 02:42 AM
How to convert from Mysql query to Codeigniter syntax? - by El Forum - 06-17-2009, 02:46 AM



Theme © iAndrew 2016 - Forum software by © MyBB