Welcome Guest, Not a member yet? Register   Sign In
Call to a member function getResultArray() on false
#1

Hi @kenjis,
I used the MySQL and PostgreSQL database drivers to test the exact same query.

When running with MySQL there is no error issue, but when using PostgreSQL I get an error like the following:

[Image: S25iRX.jpg]

I'm currently using Codeigniter 4.5.1, on the previous version 4.4.8 that I used before there was no such error like that.
Thanks for advance.
@xxxx[{::::::::::::::::::::::::::::::::>
Reply
#2

Check the actual SQL query and the result.
Reply
#3

(This post was last modified: 06-03-2024, 01:07 AM by warcooft.)

i fixed the problem by separating the methods between get() and getResultArray();

example:
PHP Code:
$users $db->table('users')->get();

if(
$users) { // check if true do something
    dd($users->getResultArray());



but i don't know why above case only happens when using PostgreSQL?
@xxxx[{::::::::::::::::::::::::::::::::>
Reply
#4

Check the actual SQL query.
See https://codeigniter.com/user_guide/testi...ql-queries
Reply
#5

Ok, I will check it. If I apply the event in production mode does it affect the application performance significantly?
@xxxx[{::::::::::::::::::::::::::::::::>
Reply




Theme © iAndrew 2016 - Forum software by © MyBB