ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Update function is updating database twice in 2.3.1

November 24, 2011 5:25pm

Subscribe [2]
  • #1 / Nov 24, 2011 5:25pm

    alex00

    35 posts

    The update function seems is be updating the database twice instead of once. Try to create a new database field called hits in exp_members and issue this update query. it updates the count by 2 every-time the function is loaded. Why does it update twice. Is this a bug. I’m using EE 2.3.1

    return $this->EE->db->query("UPDATE exp_members SET hits = hits+1 WHERE member_id = 1");
  • #2 / Nov 24, 2011 6:16pm

    alex00

    35 posts

    It looks like this is happening because i replaced system/codeigniter/system/core/URI.php with the older version 2.2.2. I did this because URL rewrite changed for this file and it is causing issues with my current htaccess setting. See http://ellislab.com/forums/viewthread/205141/

  • #3 / Nov 25, 2011 2:22pm

    alex00

    35 posts

    In 2.2.2 if you try to update using

    $this->EE->db->query("UPDATE exp_members SET hits = hits+1 WHERE member_id = 1");

    It updates the database twice. Can someone confirm this.

  • #4 / Nov 28, 2011 1:19pm

    Kyle Cotter

    730 posts

    Hey alex00,

    Running code from 2 different versions of ExpressionEngine is not recommended. If you can either update completely to 2.3.1, or roll back completely to 2.2.2, then we can assit you with any issues you may have with ExpressionEngine.

    Thanks!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases