Welcome Guest, Not a member yet? Register   Sign In
MYSQL longtext return null value

(This post was last modified: 12-11-2020, 02:55 PM by ReivaxBird.)


I have an issue with my codes. I use CodeIgniter 4.
I try to do a select on a table with a join. In the table Appointments, a field 'notes' is a longtext.
The query works fine for all other column except for the longtext field which return NULL everytimes (I check on MYSQL and it's not NULL).

Here is my codes :
$db = \Config\Database::connect();

$builder = $db->table('Appointments');

                $query = $builder->select('appointment')
                    ->join("Clients", "Appointments.clientid = Clients.id")
                    ->where('Appointments.branchid', session('branchid'))
                    ->where('Appointments.appointment BETWEEN STR_TO_DATE(\'' . $datefrom . '\',\'%Y-%m-%d\') AND STR_TO_DATE(\'' . $dateto . '\',\'%Y-%m-%d\')')

                $MISdetails = $query->getResultArray();

foreach ($MISdetails as $MIS) {
echo $MIS['notes'];

I used the $MIS['notes'] which return null (other value are not null).

Do you have any idea how to handles longtext column ?

My database configuration use MySQLi (I try also PDO).



Messages In This Thread
MYSQL longtext return null value - by ReivaxBird - 12-11-2020, 01:47 PM
RE: MYSQL longtext return null value - by demyr - 12-14-2020, 03:30 AM

Theme © iAndrew 2016 - Forum software by © MyBB