[eluser]willaser[/eluser]
[quote author="WanWizard" date="1329552975"]Oops, indeed something I've missed.
That line should read:
Code:
$select = $this->dm_get('_count_string');
[/quote]
Hello WanWizard, I have used Datamapper on the last stable version of CodeIgniter and everything was right. Now, I have started to use it as spark on PyroCMS and I'm having some issues with 'count()' method.
Firstly, I get this error message:
Code:
Fatal error: Cannot access protected property DM_DB_mysql_driver::$_count_string in /var/www/pyrocms/system/sparks/datamapper/1.8.2/libraries/datamapper.php on line 2518
Then, I try to fix it with the code that you said in the quote:
Code:
$select = $this->db->_count_string;
$select = $this->db->dm_get('_count_string');
and the new error is this:
Code:
Fatal error: Call to undefined method DM_DB_mysql_driver::_protect_identifiers() in /var/www/pyrocms/system/sparks/datamapper/1.8.2/third_party/datamapper/system/DB_driver.php(66) : eval()'d code on line 11
This is the line which trigger the error:
Code:
$sql = $this->db->dm_call_method('_compile_select', $select . $this->db->dm_call_method('_protect_identifiers', 'numrows'));
Greetings!