We're Moving to a New Support Platform – Starting June 1st!

We’re excited to let you know that starting June 1st, we’ll be transitioning to a new support system that will be available directly on our product websites – Amelia, wpDataTables, and Report Builder. In fact, the new support platform is already live for Amelia and wpDataTables, and we encourage you to reach out to us there.

You'll always be able to reach us through a widget in the bottom right corner of each website, where you can ask questions, report issues, or simply get assistance.

While we still do not offer live support, a new advanced, AI-powered assistant, trained on our documentation, use cases, and real conversations with our team, is there to help with basic to intermediate questions in no time.

We're doing our best to make this transition smooth and hassle-free. After June 1st, this current support website will redirect you to the new "Contact Us" pages on our product sites.

Thanks for your continued support and trust – we’re excited to bring you an even better support experience!

Okay
  Public Ticket #2710679
New entry by user
Closed

Comments

  • Donny Lairson started the conversation

    I created a test account. I have tried to follow video's.

    I have a CUSTOM table in my wordpress database. 

    So the table you see in link is NOT gathering the Current user ID and using it to insert data.  If all the fields are filled out it will insert data.

    But as you will be able to tell with a free account it won't draw the table information back up because its selected by %current_user_id% and a new entry is blank.

  • Donny Lairson replied

    INSERT INTO wp_1_users_stats.`rrg_id`
    SELECT ‘%CURRENT_USER_ID%’
    WHERE NOT EXISTS (
    SELECT wp_1_users_stats.`castle_level`,
    wp_1_users_stats.`rrg_id`,
    wp_1_users_stats.`in_game_name`,
    wp_1_users_stats.`Kingdom`,
    wp_1_users_stats.`alliance_tag`,
    wp_1_users_stats.`airship_level`, 
    wp_1_users_stats.`march_capacity`
    FROM wp_1_users_stats WHERE wp_1_users_stats.`rrg_id` = '%CURRENT_USER_ID%')


    I tried to correct the problem before the request of table information but INTO is not implemented error came up.

  • Donny Lairson replied

    Adding current user id to the predefined values field did not actually produce that predefined value so that a new entry could be be made.

  •  2,576
    Aleksandar replied

    Hello Donny

    %CURRENT_USER_ID% placeholder can only be used from within wpDataTables, and the plugin doesn't support the query that looks like this:

    INSERT INTO wp_1_users_stats.`rrg_id`
    SELECT '%CURRENT_USER_ID%'
    WHERE NOT EXISTS (
    SELECT wp_1_users_stats.`castle_level`,
    wp_1_users_stats.`rrg_id`,
    wp_1_users_stats.`in_game_name`,
    wp_1_users_stats.`Kingdom`,
    wp_1_users_stats.`alliance_tag`,
    wp_1_users_stats.`airship_level`, 
    wp_1_users_stats.`march_capacity`
    FROM wp_1_users_stats WHERE wp_1_users_stats.`rrg_id` = '%CURRENT_USER_ID%')

    INSERT INTO can only work in the database.

    So, if you use the query:

    SELECT wp_1_users_stats.`castle_level`,
    wp_1_users_stats.`rrg_id`,
    wp_1_users_stats.`in_game_name`,
    wp_1_users_stats.`Kingdom`,
    wp_1_users_stats.`alliance_tag`,
    wp_1_users_stats.`airship_level`, wp_1_users_stats.`march_capacity`
    FROM wp_1_users_stats WHERE wp_1_users_stats.`rrg_id` = %CURRENT_USER_ID%

    And if rrg_id contains the ID of the currently logged in user, it should display the correct data.

    Also, when using SQL queries in wpDataTables, please refer from using accent graves ( ` ), so since the data is being pulled from a single table, you can use this:

    SELECT castle_level,
            rrg_id,
            in_game_name,
            Kingdom,
            alliance_tag,
            airship_level, 
            march_capacity
    FROM wp_1_users_stats 
    WHERE rrg_id = %CURRENT_USER_ID%


    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables