Database INSERT function

  • Hello everybody. I have already asked how to make a queries to database few days ago and it helped me a lot. But I want ask, how to make INSERT query (like in MySQL). For example user with uid 1 have reputation with parameter 0, and i want make INSERT query and chage it on 1. Thanks for your answering. :)

  • Any ideas? :weary:

  • Admin


    db.objects.update({_key:"user:1"}, {$set: {"reputation": 2}});
    db.objects.update({_key:"users:reputation", "value": "1"}, {$set: {"score": 2}});


    hset user:1 reputation 2
    zadd users:reputation 2 1

  • Didn't work :(
    When I do a query, got a three dots, nothing else.

  • Admin

    There was a typo in my original reply, I corrected them try again.

  • Thank you, you have solved the problem. :)

Log in to reply

Looks like your connection to NodeBB was lost, please wait while we try to reconnect.