Model error with builder first() |
Hi,
I'm trying to do a simple model query but it doesn't seem to work as defined in the official documentation. Here's my code below: PHP Code: <?php I got the error: Argument 1 passed to CodeIgniter\Database\BaseResult::getFirstRow() must be of the type string, null given How can I solve that? Regards
Remove your constructor.
Yes that does the charm!
It was there when I took the code and I didn't challenged it. Cheers (05-31-2024, 05:09 AM)tassman Wrote:(12-21-2022, 10:47 PM)kenjis Wrote: Remove your constructor. Got answer ![]() https://codeigniter.com/user_guide/model...e-database
Because CodeIgniter's Model automatically connects to the database.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |