CodeIgniter Forums
is it a bug? customResultObject() - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: is it a bug? customResultObject() (/showthread.php?tid=70666)



is it a bug? customResultObject() - smotrikov - 05-10-2018

Hello . I'm trying to get the query result using getCustomRowObject() .
Example 
PHP Code:
$query $this->db->query("SELECT 1 as `user_id`,'[email protected]' as `email` , 'asdasd' as `password` ");

 
           return $query->getCustomRowObject(0,'App\Entities\User'); 
But I get an error : 
Code:
Call to undefined method CodeIgniter\\Database\\MySQLi\\Result::customResultObject()
I looked through two files:  \system\Database\BaseResult.php and \system\Database\ResultInterface.php . I did not find a method customResultObject() . Can help solve this problem?
Thanks


RE: is it a bug? customResultObject() - Paradinight - 05-10-2018

(05-10-2018, 09:21 AM)smotrikov Wrote: Hello . I'm trying to get the query result using getCustomRowObject() .
Example 
PHP Code:
$query $this->db->query("SELECT 1 as `user_id`,'[email protected]' as `email` , 'asdasd' as `password` ");

 
           return $query->getCustomRowObject(0,'App\Entities\User'); 
But I get an error : 
Code:
Call to undefined method CodeIgniter\\Database\\MySQLi\\Result::customResultObject()
I looked through two files:  \system\Database\BaseResult.php and \system\Database\ResultInterface.php . I did not find a method customResultObject() . Can help solve this problem?
Thanks

lates version?

https://github.com/bcit-ci/CodeIgniter4/blob/develop/system/Database/BaseResult.php#L336

edit:
it is missing. a bug :/


RE: is it a bug? customResultObject() - smotrikov - 05-10-2018

(05-10-2018, 11:22 AM)Paradinight Wrote:
(05-10-2018, 09:21 AM)smotrikov Wrote: Hello . I'm trying to get the query result using getCustomRowObject() .
Example 
PHP Code:
$query $this->db->query("SELECT 1 as `user_id`,'[email protected]' as `email` , 'asdasd' as `password` ");

 
           return $query->getCustomRowObject(0,'App\Entities\User'); 
But I get an error : 
Code:
Call to undefined method CodeIgniter\\Database\\MySQLi\\Result::customResultObject()
I looked through two files:  \system\Database\BaseResult.php and \system\Database\ResultInterface.php . I did not find a method customResultObject() . Can help solve this problem?
Thanks

lates version?

https://github.com/bcit-ci/CodeIgniter4/blob/develop/system/Database/BaseResult.php#L336

edit:
it is missing. a bug :/

Thanks for your reply


RE: is it a bug? customResultObject() - ciadmin - 05-11-2018

This has been fixed Smile


RE: is it a bug? customResultObject() - Paradinight - 05-11-2018

(05-11-2018, 07:18 AM)ciadmin Wrote: This has been fixed Smile

thank Smile