![]() |
Verification error - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Verification error (/showthread.php?tid=34608) |
Verification error - El Forum - 10-04-2010 [eluser]Thiago Leao[/eluser] please, i need help in the verification... list_subcategory - controller Code: <?php list_subcategory - Views Code: <?php error Code: A PHP Error was encountered someone help? thanks Verification error - El Forum - 10-04-2010 [eluser]joedy[/eluser] It means there is no object you want to get. $query->result() is used to returns as an array of "objects". so it shouldn't be like this $subcategoria[0]->id_sub, its $subcategoria->id_sub I suggest You to show the data return 1st before doing next process. You can use print_r($subcsategoria); Verification error - El Forum - 10-04-2010 [eluser]theprodigy[/eluser] Also, in your controller, you might want to return the result. You are calling the results function, but not setting anything to it, and not returning it. Change: Code: function listar($maximo, $inicio){ To: Code: function listar($maximo, $inicio){ Verification error - El Forum - 10-05-2010 [eluser]Thiago Leao[/eluser] [quote author="theprodigy" date="1286269012"]Also, in your controller, you might want to return the result. You are calling the results function, but not setting anything to it, and not returning it. Change: Code: function listar($maximo, $inicio){ To: Code: function listar($maximo, $inicio){ Code: A PHP Error was encountered same error! Verification error - El Forum - 10-05-2010 [eluser]Thiago Leao[/eluser] [quote author="joedy" date="1286265933"]It means there is no object you want to get. $query->result() is used to returns as an array of "objects". so it shouldn't be like this $subcategoria[0]->id_sub, its $subcategoria->id_sub I suggest You to show the data return 1st before doing next process. You can use print_r($subcsategoria);[/quote] Code: Array ( [0] => stdClass Object ( [id_sub] => 16 [id_category] => 24 [id_user] => 1 [subcategoria] => testee ) ) 1 Looks print_r($subcategoria); i wait help! thanks friends! Verification error - El Forum - 10-05-2010 [eluser]Thiago Leao[/eluser] anyone? pls! Verification error - El Forum - 10-05-2010 [eluser]theprodigy[/eluser] change your view to: Code: <?php Verification error - El Forum - 10-05-2010 [eluser]Thiago Leao[/eluser] worked perfectly!!!! had not thought that way! thank you so much! |