CodeIgniter Forums
count_all_results() and sqlite - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: count_all_results() and sqlite (/thread-18922.html)



count_all_results() and sqlite - El Forum - 05-22-2009

[eluser]Jan van Casteren[/eluser]
Does count_all_results() (from active records) not work with a sqlite database?

when I do something like this:

$this->db->where('schoolId', $schoolId);
$this->db->where('name', $name);
$this->db->from('child');
$this->db->count_all_results();

I get:

Error Number: 1

near "numrows": syntax error

numrows FROM kind WHERE schoolId = 'XXXX' AND naam = 'Tester'

I use the sqlite driver for sqlite3/pdo from codeigniters Wiki (info here: http://codeigniter.com/wiki/PDO_SQLite3/, download here: http://codeigniter.com/wiki/File:pdo_sqlite_driver.zip/ , but it seems to be very incomplete, I had other errors and warning when using transactions and other functions.

Has anybody plan to fix this kind of issues. Is it something that would take a lot of work? I could try to do it myself, I am not a newby to programming, but I am to PHP.

I would like to use active record, so I can use sqlite while still in development and still have the possibility to move to another database when the website/program is released.


Jan