Wordpress plugin SQL syntax error

Discussion in 'Integration' started by ryandeiss, Jun 14, 2008.

  1. ryandeiss

    ryandeiss New Member

    Joined:
    May 18, 2007
    Messages:
    4
    I'm attempting to install the wordpress plugin but I keep getting the following error on the plugin configuration page:

    ---------------
    WordPress Board Db and Prefix - incorrect value. Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-wp.wp_users LIMIT 1' at line 1
    ---------------

    I installed amember in the same database as wordpress (just with a different table prefix) and with the same database user, so it shouldn't have any problem integrating.

    I've double-checked the WordPress Board Db and Prefix, Secret Key, and WordPress Version fields and they are all correct, so I don't know what could be causing the error.

    Any help would be greatly appreciated.

    Thank you,
    Ryan
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    Hmmm, Although I havent done any integrations where the amember and wordpress are in the same database sounds like you got it set up right, and it should be working...

    Hard to diagnose without seeing your amember admin screen, and database in phpmyadmin etc.

    This error is on the wordpress plugin page not the main admin page right?

    David
  3. ryandeiss

    ryandeiss New Member

    Joined:
    May 18, 2007
    Messages:
    4
    Yeah, it's just on the plugin configuration page and appears when I click the "Save" button. For what it's worth, originally I tried it with them in separate databases but plesk requires me to have a different database user for each MySQL database and I thought that might have been what caused the problem.

    So, I completely deleted and reinstalled amember (this time in the same database as wordpress so there wouldn't be any communication issues) but no luck.

    I can provide screenshots of the screens you mentioned, but I don't know how much it will help.

    -Ryan
  4. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    If you haven't gotten help from amember support, contact me via my site's contact form and I'll see what I can do.

    David
  5. ryandeiss

    ryandeiss New Member

    Joined:
    May 18, 2007
    Messages:
    4
    Thanks for the help, David, but I did hear back from aMember. Turns out it was user error (big surprise).

    The instructions on the wordpress plugin configuration page tell you to enter the database name and wordpress table prefix into the 2nd box in the following format:

    database_name.wp_table_prefix

    So, if the database name is "wordpress" and the table prefix is "wp_" you would enter:

    wordpress.wp_

    ...in the 2nd field.

    What I failed to see, however, is that the instructions actually say:

    [Enter] database name (if other database) plus WordPress
    tables prefix, like wordpress.wordpress_

    I missed the "if other database" part, and since amember was installed in the same database as wordpress I only needed to enter the table prefix:

    wp_

    ...in the 2nd text box.

    Sorry for the overly lengthy explanation, but I wanted to fully document this in case anyone else runs into this same problem.

    -Ryan

Share This Page