Create Adjustment via SQL

  • Dear All,

    Unfortunately we cannot deal with the api.php high load when Decay is enabled. (I Using php-fpm + Apache + Well optimalized PerconaDB mysql - On AMD EPYC CPU / but tried with a recent Xeon Gold CPU too). We bought a dedicated server for 70 euro with nvme ssd, new recent cpu and the api.php peformance is very dissapointing. NOTE: I using a similar server configuration for a webshop, contains 30K products and have 20K users...


    I would like to ask, how to make a valid simple adjustment to an user trough the sql. As i see, there's a table: "eqdkp23_adjusments", which have a "adjustment_group_key" - Where does this key comes? If i make a single adjustment, then this key is also generated individually. But if i just insert a new adjustment, that will not displayed on the page. How to make this work?


    If i don't use any decay, then it's working fine and relative fast. I would like to make a script which is run as a cronjob, and make the adjustments trough an SQL insert. Gets the users current points, then make a single adjustment with minus 10% and run once a week.


    Thank you very much!

  • As many data is cached, as well in database tables, and on the file system, just inserting a new adjustment won't change the standings and will not make that the added adjustment is shown.

    Viele Grüße,
    GodMod


    Bitte sendet mir keine unaufgeforderten Support-PNs. | Please don't send me unwanted support-PMs.
    Du willst dich bei mir bedanken: | You want to thank me:

    amazon_wishlist.jpg paypal_logo.jpg

  • The ideal way is using the PHP Api, which the external API Script for inserting the adjustment does.

    Viele Grüße,
    GodMod


    Bitte sendet mir keine unaufgeforderten Support-PNs. | Please don't send me unwanted support-PMs.
    Du willst dich bei mir bedanken: | You want to thank me:

    amazon_wishlist.jpg paypal_logo.jpg

  • PHP Error when Posting to ID 30:

    [Fri Jul 03 07:48:33.535667 2020] [proxy_fcgi:error] [pid 4807] [client 192.168.0.254:52596] AH01071: Got error 'PHP message: PHP Notice: Undefined index: host in /home/rewind/htdocs/core/core.class.php on line 1386PHP message: PHP Warning: Illegal string offset 'member' in /home/rewind/htdocs/core/exchange/add_adjustment.php on line 52PHP message: PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/rewind/htdocs/core/exchange/add_adjustment.php on line 52PHP message: PHP Warning: Illegal string offset 'member' in /home/rewind/htdocs/core/exchange/add_adjustment.php on line 61PHP message: PHP Warning: Illegal string offset 'member' in /home/rewind/htdocs/core/exchange/add_adjustment.php on line 66PHP message: PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/rewind/htdocs/core/plus_exchange.class.php on line 183PHP message: PHP Notice: Undefined index: format in /home/rewind/htdocs/core/plus_exchange.class.php on line 168PHP message: PHP Notice: Undefined index: format in /home/rewind/htdocs/core/plus_exchange.class.php on line 170'

  • That's because you haven't followed the format. The member element is missing, specifing the members for the adjustment.

    Viele Grüße,
    GodMod


    Bitte sendet mir keine unaufgeforderten Support-PNs. | Please don't send me unwanted support-PMs.
    Du willst dich bei mir bedanken: | You want to thank me:

    amazon_wishlist.jpg paypal_logo.jpg

  • I checked the image, and it's the same: you haven't followed the specified format.


    Code
    <adjustment_members><member>1</member><member>2</member></adjustment_members>

    See the members element in there? That's why the php error you posted occurs, because it is missing.

    Viele Grüße,
    GodMod


    Bitte sendet mir keine unaufgeforderten Support-PNs. | Please don't send me unwanted support-PMs.
    Du willst dich bei mir bedanken: | You want to thank me:

    amazon_wishlist.jpg paypal_logo.jpg

  • Then go to bed, sleep and start again tomorrow.

    Viele Grüße,
    GodMod


    Bitte sendet mir keine unaufgeforderten Support-PNs. | Please don't send me unwanted support-PMs.
    Du willst dich bei mir bedanken: | You want to thank me:

    amazon_wishlist.jpg paypal_logo.jpg

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!