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 #2731416
Filter by user
Closed

Comments

  • Ivan started the conversation

    How can I query DB to only show records in table from logged user on website?

    Or when adding data to add in DB with user ID?


    Thnx

  • Ivan replied

    And I would like to add something to this question as well....

    I created table and as far as I see data is written in database, but on the front-end data is not loading in table. It appears empty even if there is records in database, so something I definitely did wrong :)

    And, when adding, can I prevent user to add emptyline (cause I see that I've added accidentally several empty lines)


    In DB:

    4070425665.png


    On page:

    6758371137.png


  • Ivan replied

    Any chance someone might know what have I done wrong here? :)

  •  2,576
    Aleksandar replied

    Hello Ivan

    Thank you for your purchase.

    If you're pulling a table from your database, and you want to limit the user to only see his data, you need to have a User ID column in that database table. In every row, a User ID needs to be assigned, so for example, if you have 50 rows in the table, and 5 of those rows contain ID:3, when the user with ID 3 logs in, he should only see the 5 rows.

    To achieve that, you can pull the table from the database, and filter it using our placeholder %CURRENT_USER_ID%, like this:

    SELECT * FROM yourDatabaseTable
    WHERE user_id_column = %CURRENT_USER_ID%

    How did you create the table that's coming up empty in wpDataTables, can you show me the query, and the database table's name?

    Every editable column can be mandatory, so you can go to column settings, and set it as mandatory, so users can't add an empty row.

    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