Giter VIP home page Giter VIP logo

Comments (7)

yadakhov avatar yadakhov commented on July 28, 2024 1

I can write code to look up the updatedColumns array. If the user pass in a "string" key associative array it will use the right hand side.

insertOnDuplicateKey(array $data, array $updateColumns = null)

For you case the $updatedColumns should look like:

$updatedColumns = ['counter_elem' => 'counter_elem + 1']

I'll make the code change when I have time later today.

from insert-on-duplicate-key.

yadakhov avatar yadakhov commented on July 28, 2024

@nonsapiens I pushed the code for the enhancement. Can you give it a quick test by changing your composer.json

"yadakhov/insert-on-duplicate-key": "dev-master"

Once more testing is done I can create a new release version v1.2.0

from insert-on-duplicate-key.

nonsapiens avatar nonsapiens commented on July 28, 2024

Sorry mate been on leave for some time. Let me give this a try, see how it goes!

from insert-on-duplicate-key.

ronnievisser avatar ronnievisser commented on July 28, 2024

when will this gets version 1.2?

from insert-on-duplicate-key.

yadakhov avatar yadakhov commented on July 28, 2024

I apologize. Forgot to create a new release. 1.2 is done.

from insert-on-duplicate-key.

ronnievisser avatar ronnievisser commented on July 28, 2024

from insert-on-duplicate-key.

nonsapiens avatar nonsapiens commented on July 28, 2024

Sorry I realised I forgot to reply to this from way back: thanks for this, works well ...

from insert-on-duplicate-key.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.