Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    May 2010
    Posts
    36
    Plugin Contributions
    0

    Default Re: Database Errors - Duplicate Entries - How Did You Hear About Us Mod

    Couldnt edit my post but i've found a fix.

    In /includes/modules/create_account.php (you may have this file in YOUR_TEMPLATE folder) i believe either by lack of instruction or concentration there was a block of code which i needed to delete.

    Around line 329 you should have code that looks like this:
    //rmh referral start
    $query_insert= "insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created, customers_info_source_id) values ('" . (int)$_SESSION['customer_id'] . "', '0', now(), '". (int)$source . "')";

    $sql = "insert into " . TABLE_CUSTOMERS_INFO . "
    (customers_info_id, customers_info_number_of_logons,
    customers_info_date_account_created, customers_info_date_of_last_logon)
    values ('" . (int)$_SESSION['customer_id'] . "', '1', now(), now())";
    $db->Execute($query_insert);

    $db->Execute($sql);
    If you delete:
    $sql = "insert into " . TABLE_CUSTOMERS_INFO . "
    (customers_info_id, customers_info_number_of_logons,
    customers_info_date_account_created, customers_info_date_of_last_logon)
    values ('" . (int)$_SESSION['customer_id'] . "', '1', now(), now())";
    It should work for you. If you examine the code you can see that the data is being inserted to the database twice.

    Hope this helps people

  2. #2
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Database Errors - Duplicate Entries - How Did You Hear About Us Mod

    Hi yeah, I meant to add a response to this last nigth but I was too tired by the tme I'd solved it. Like you, it turned out that another modification in my create_account.php was writing to the same table. In my case it was the 'COWA' mod. I just deleted the duplicate lines from the file and voila, the new mod worked perfectly.

 

 

Similar Threads

  1. How Did You Hear About Us? Referrals Mod [Support Thread]
    By martyndw2005 in forum All Other Contributions/Addons
    Replies: 364
    Last Post: 30 Mar 2026, 02:40 PM
  2. How Did You Hear About Us? mod
    By yeah! in forum All Other Contributions/Addons
    Replies: 15
    Last Post: 28 Dec 2011, 06:28 PM
  3. How Did You Hear About Us Mod...2 Instances Possible??
    By jdw1979 in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 26 Mar 2010, 02:14 PM
  4. Replies: 2
    Last Post: 23 Jul 2009, 02:11 PM
  5. Error in admin - PayPal - when using How Did You Hear About us mod
    By TrvlFox in forum PayPal Express Checkout support
    Replies: 3
    Last Post: 23 Nov 2007, 03:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg