Welcome Guest, Not a member yet? Register   Sign In
$model->update([], ['column' => NULL]) set the whole table column to null
#1

Hello,

PHP Code:
$model model('myModel');

$model->update([], ['column' => NULL]); 

If the first argument is an empty array, the entire table is affected, is it the normal behavior ?

CI 4.2.6
Reply
#2

See https://forum.codeigniter.com/showthread.php?tid=84833
Reply
#3

Don't pass an empty array.
Reply
#4

@kenjis @iRedds
Thanks for your feedbacks.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB