insert without data |
Hi guys,
i'm facing one "problem" with inserting new data into table. PHP Code: $this->model->insert([]) for me expecting query would be: Code: INSERT INTO gallery VALUES(); which is fine and works well - inserts one new row into defined table instead of this, codeigniter returns me an error 'no data for insert' table structure: Code: gallery_id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT I really don't need any data to insert. Looking for solution how to override this behaviour without any hack and with query builder. Wouldn't be great to check in query builder, if param $data of function insert($data = null, ...) isn't null but can be empty array? vendor/codeigniter4/framework/system/Model.php PHP Code: /** |
Messages In This Thread |
insert without data - by webdeveloper - 06-05-2022, 04:26 AM
RE: insert without data - by kilishan - 06-05-2022, 08:56 PM
RE: insert without data - by webdeveloper - 06-07-2022, 03:12 AM
RE: insert without data - by kilishan - 06-07-2022, 06:42 AM
RE: insert without data - by webdeveloper - 06-08-2022, 05:44 AM
RE: insert without data - by kenjis - 06-10-2022, 04:03 PM
|