[eluser]John_Betong[/eluser]
CodeIgniter User Guide Version 1.6.0
Active Record Class
Quote: $this->db->count_all();
Permits you to determine the number of rows in a particular table.
Submit the table name in the first parameter.
Example:
Code:
echo $this->db->count_all('my_table');
// Produces an integer, like 25
Actual Results
Quote:The Error returned was:
An Error Was Encountered
Error Number: 1064
You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version
for the right syntax to use near 'FROM `quotes`' at line 1
SELECT COUNT(*) AS FROM `quotes`
Possible solution/kludge
file: system/data/base/drives/mysql/mysql_driver.php
Quote: // revised line: 45
var $_count_string = 'SELECT COUNT(*) AS numrows ';
// Old line 45
// var $_count_string = 'SELECT COUNT(*) AS ';
Three guesses but no prizes for the result of this code
Cheers,
John_Betong