MYSQL Error after latest upgrade

Discussion in 'Troubleshooting' started by extremeb, Jan 28, 2009.

  1. extremeb

    extremeb Jrobe

    Joined:
    Jan 18, 2005
    Messages:
    4
    I recently upgraded from 3.1.4 to 3.1.6. My members are now receiving an error when attempting to access their account information screen...

    MYSQL ERROR:
    Unknown column 'member_id' in 'where clause'
    in query:
    SELECT * FROM extremeb_coupon WHERE 1 AND member_id='9882'

    HELP!! :)

    Thanks
  2. markdaniels

    markdaniels New Member

    Joined:
    Mar 3, 2008
    Messages:
    1
    Getting same error here!!!

    MYSQL ERROR:
    Unknown column 'member_id' in 'where clause'
    in query:
    SELECT * FROM amember_coupon WHERE 1 AND member_id='1'
  3. biztechz

    biztechz New Member

    Joined:
    Sep 11, 2007
    Messages:
    2
    damn am getting the same error also.
    Please help .
  4. zenpig66

    zenpig66 aMember Pro Customer

    Joined:
    Jan 1, 2009
    Messages:
    72
    did you run the db update after uploading the new files? There's a sql file with the latest update which adds a "member_id" field to the coupon table.
  5. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    Run:

    Code:
    \amember\admin\upgrade_db.php
    Please do check back and let us know if this fixes the issue for you.
  6. biztechz

    biztechz New Member

    Joined:
    Sep 11, 2007
    Messages:
    2
    it didn't fix my issue it remains the same
  7. zenpig66

    zenpig66 aMember Pro Customer

    Joined:
    Jan 1, 2009
    Messages:
    72
    hm....do you see a "member_id" field in the "coupons" table? I really can't think of anything else that would be causing that specific error except not having it. I'm not trying to be a smartass here but are you sure you had the sql file from the latest update in the root of your AMember folder when you ran http://yoursite.com/amember/admin/upgrade_db.php? I don't think it would be a caching problem but might want to clear the templates_c directory, too.
  8. william_carr

    william_carr New Member

    Joined:
    Aug 27, 2006
    Messages:
    1
    I experienced the same thing. Then went to admin and unchecked coupons and it works.

    At least for me, the issue appears related to coupons.

    I will wait for support (submitted ticket), and their fix, before checking (allowing) coupons again.
  9. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    I emailed alex about this- he said the version currently online has been fixed.


    David
  10. bjk68

    bjk68 New Member

    Joined:
    Nov 15, 2008
    Messages:
    24
    Same problem here.

    How do I implement this fix? Uploading the fixed files won't fix any database issues, because the upgrade_db script will think I am already on version 3.1.6.

    Maybe you could deliver an sql-script I can run to fix this problem.
  11. bjk68

    bjk68 New Member

    Joined:
    Nov 15, 2008
    Messages:
    24
    How is this helping all the people who already downloaded and installed the original version 3.1.6?

    You should send an e-mail to all aMember PRO owners, to tell them about this problem and inform them how they can fix this.

    Proper version control does not allow you to make changes to an already distributed version without changing the version number.
  12. onfio

    onfio New Member

    Joined:
    Dec 30, 2008
    Messages:
    2
    Coupon related MySQL error

    Please let us know how to get the Coupon/Member_ID related MySQL fixed for the latest 3.1.6 upgrade for those that already downloaded the upgrade when the bug was still there.

    As it stands now, one has to disable Coupons to get login working.

    Please provide step-by-step instructions.
  13. ronniead

    ronniead Member

    Joined:
    Dec 20, 2007
    Messages:
    118
    fixed?

    I am confused about which version no longer has this issue. Waiting for someone to confirm that this problem is fixed, and how to apply the fix...etc...

    I'm on version 3.09 and have yet to upgrade...I will wait until this gets fixed.
  14. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    "Database version were not upgraded in common.inc.php"

    Alex had said it was a script problem, so uploading the new version should fix that error.

    David
  15. onfio

    onfio New Member

    Joined:
    Dec 30, 2008
    Messages:
    2
    could someone state clearly and step-by-step what to do if one has already upgraded to 3.1.6 and the coupon issue is causing fatal error for users to login?

    tried downloading the latest 3.1.4->3.1.6 upgrade and tried uploading that, login fails

    tried re-loading .sql and running the db update, the login still fails.

    tried re-loading common.inc.php, the login still fails.

    please state clearly what to do....

    as such, coupons are not working (the coupon table entry does not have member_id, this is likely the cause, but how do we fix it)?
  16. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Here is how this can be fixed:
    1. Download aMember PRO latest version or upgrade package that you used again.
    2. reupload two files from that package : amember.sql and common.inc.php
    3. Run /amember/admin/upgrade_db.php

    If this didn't help.

    1. Rollback amember database version from phpMyAdmin using this query:
    update amember_config set value = '313' where name='db_version'
    Then run /amember/admin/upgrade_db.php

    or

    2. Add filed member_id to amember_coupons table (int not null default 0)

    You can also contact us in helpdesk with "URGENT UPGRADE ISSUE" subject we will fix this issue asap.
  17. uconcept

    uconcept New Member

    Joined:
    Jan 30, 2008
    Messages:
    1
    Sampe problem

    I am having the same problem. I have tried what you mentioned here without lock. The other option about rollback is too technical for me. I issued a ticket but didn't have the URGENT heading you mentioned here. Please help.
    Ticke no. Ticket ID: ZGN-16787-341
  18. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    uconcept, just to be sure:

    1) Clear your browser cache and delete your previous downloaded version of the aMember code to your PC (NOT your server copy :-p)
    2) Redownload the aMember Pro code
    3) upload \amember\amember.sql and \amember\common.inc.php to your server
    4) from your browser, run http://{yourdomain.com}/amember/upgrade_db.php

    Do you get an error message?

    If you still have problems, email me at my userid here @ hotmail.com and I'll do what I can to help.
  19. shon

    shon New Member

    Joined:
    Jan 4, 2006
    Messages:
    9
    I performed the above patches and all is now good. Wished I had waited longer next time to perform an upgrade. :(
  20. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    @uconcept are you back up and running now?

Share This Page