Welcome Guest, Not a member yet? Register   Sign In
v4.2.10 released
#1

Hello everyone. We have released bug fix v4.2.10. Minor bugs have been fixed.
If you use PHPStan, I recommend you update!

See https://github.com/codeigniter4/CodeIgni...ANGELOG.md
Reply
#2

Thanks CI
Reply
#3

Thank you to the CodeIgniter Development Team for your hard work.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#4

I need to Insert data in table but on duplicate for unique coloumn I wan to do nothing or update other columns
In codeigniter 4 Save function only update on if primary key is exists.

Any suggestion how to do this in Codeigniter 4?

I am not sure how to create new Post here hence reply to this thread with question! Sorry for any inconviniece !
Reply
#5

(11-15-2022, 12:17 PM)jseemaj Wrote: I need to Insert data in table but on duplicate for unique coloumn I wan to do nothing or update other columns
In codeigniter 4 Save function only update on if primary key is exists.

Any suggestion how to do this in Codeigniter 4?

You can write any SQL statement with $db->query() method.
https://codeigniter4.github.io/CodeIgnit...eries.html

v4.3.0 will have upsert() and upsertBatch() in Query Builder.
Reply
#6

Nice !
I will try it as soon as possible.
Have a good week-end !
Reply




Theme © iAndrew 2016 - Forum software by © MyBB