![]() |
Object of class CI_DB_mysql_result could not be converted to string [SOLVED] - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Object of class CI_DB_mysql_result could not be converted to string [SOLVED] (/showthread.php?tid=16560) |
Object of class CI_DB_mysql_result could not be converted to string [SOLVED] - El Forum - 03-10-2009 [eluser]Asinox[/eluser] Hi guys, im trying to count register, but i have the next error: Code: A PHP Error was encountered my code Code: function columnasTiposBares(){ What is wrong guys? Thanks Object of class CI_DB_mysql_result could not be converted to string [SOLVED] - El Forum - 03-10-2009 [eluser]TheFuzzy0ne[/eluser] Which is line 41? Object of class CI_DB_mysql_result could not be converted to string [SOLVED] - El Forum - 03-10-2009 [eluser]TheFuzzy0ne[/eluser] OK, I see that this is line 41: Code: $tip[] = anchor('site/lugares/'.$tipo->tipo,$tipo->tipo)."->".$this->db->query('SELECT COUNT(tipo) as total from negocios where tipo = "'.$tipo->tipo.'"'); Object of class CI_DB_mysql_result could not be converted to string [SOLVED] - El Forum - 03-10-2009 [eluser]Asinox[/eluser] ok, thanks, is working ![]() $tip[] = anchor('site/lugares/'.$tipo->tipo,$tipo->tipo)." ( ". HERE I NEED THE SUM TOTAL ." )"; Code: function columnasTiposBares(){ thanks Object of class CI_DB_mysql_result could not be converted to string [SOLVED] - El Forum - 03-10-2009 [eluser]Asinox[/eluser] ok, thanks i did it Code: function columnasTiposBares(){ Thanks Object of class CI_DB_mysql_result could not be converted to string [SOLVED] - El Forum - 03-10-2009 [eluser]TheFuzzy0ne[/eluser] Code: $tip[] = anchor('site/lugares/'.$tipo->tipo,$tipo->tipo)." ( ".$contando->row()->total ." )"; # this will only work in PHP 5 Object of class CI_DB_mysql_result could not be converted to string [SOLVED] - El Forum - 03-10-2009 [eluser]TheFuzzy0ne[/eluser] Well done. ![]() |