codeigniter4 / CodeIgniter4

Open Source PHP Framework (originally from EllisLab)
https://codeigniter.com/
MIT License
5.4k stars 1.9k forks source link

Bug: prepared statement execute() returns Result object for all queries #4342

Closed kenjis closed 2 years ago

kenjis commented 3 years ago

Describe the bug In the CI4 spec, query() returns bool for write-type queries. But the current implementation of execute() returns Result object for all queries.

Isn't it a bug?

See https://github.com/codeigniter4/CodeIgniter4/pull/4176#issuecomment-784805837.

CodeIgniter 4 version develop branch.

Affected module(s) Database

Expected behavior, and steps to reproduce if appropriate The same as query() return value.

michalsn commented 3 years ago

Yes, for write-type queries we should have a boolean result.

sclubricants commented 2 years ago

Does https://github.com/codeigniter4/CodeIgniter4/pull/6750 close this?

kenjis commented 2 years ago

Yes.

kenjis commented 2 years ago

Closed by #6750