Okay
  Public Ticket #1799493
WPDatatables data source variable
Closed

Comments

  • James Sharpe started the conversation

    Firstly, I would like to take a minute to thank you fro WPDatatables.  It is the very best plugin for Wordpress I have ever used.  Tables have always been the one thing I hated doing, and this makes it great!  The modals are wonderful!!! Anyway, on to my question:

    200 Users each with their own set of CSV files named the same, in individual user folders.  I display the same info. for each user.  I want to use 1 table, not 200.

    Is there a way to hook directly to the existing datasource variable so I can update the path to CSV the file every time the form loads?  Is it a public variable that I can manipulate with some php to update the data source path, before the form loads?

    Thanks in advace,

    Jim... 


  •  2,572
    Aleksandar replied

    Hello Jim.

    Thank You for Your purchase. We're glad that You're enjoying our plugin and we thank You for the kind words.

    I apologize, but I don't quite understand which form You're trying to load or where the mentioned path is coming from. Could You provide some examples here? Perhaps a couple of CSV files and a table where the data is being stored; some screenshots; what You expect the final result to look like?

    Please note that You've opened a public ticket, so before sending any files our way, make sure You reply privately to keep the data visible only to us. We do not interfere with any data, nor do we provide any user data to third parties.

    Best regards.

    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

  •   James Sharpe replied privately
  •  2,572
    Aleksandar replied

    Hello again Jim.

    Unfortunately, what You're trying to achieve here is not possible with the current configuration. Since these tables are stored in the database, and the data is dynamically entered, it may happen that if two or more users log in at the same time they can see data from a different user, or the table would just stop working all in all, and I believe that is not something You'd be happy to see.

    However, if You were to create a script that would store data from SQLite database to MySQL, You could do this. You'd need to add a new column that would have a user ID, so whenever a user logs in it adds his ID to the table. You'd have those 4 tables that could pull the data from .sql like this:

    select * from "tablename_from_users_sql_files" where user_id = %CURRENT_USER_ID%

    You can see more details on how to use the %CURRENT_USER_ID% placeholder here.

    I hope You'll find this information helpful.

    Best regards.

    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

  • James Sharpe replied

    Thanks for the help.  I took the weekend and setup a regular MySQL database and have it importing the SQLite export every couple of minutes to keep them in sync.  Tables are working fine from the MySQL database, all with the exception of one.  On one table I get the following error:

    cannot calculate position of within 'Table'

    What do I need to do to get that particular table working correctly?  It looks fine in PhpMyAdmin.

    Thanks again for all of your help,

    Jim ...


  •  2,572
    Aleksandar replied

    Hello again Jim.

    To be able to determine what the actual issue is, I'd need to go in and take a look. So, if You could please provide me a temporary WP-admin login for your site where this happens, I could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course we do not provide login data to third party. You can write credentials here just check Private Reply so nobody can see them except us.

    You could be using a reserved keyword, or You may have changed something in the database, but not in back-end so it doesn't pull the data properly. Many number of guesses. But we don't like to guess things, but to actually resolve them and help our customers. That's why remote access is the best way to go here.

    Best regards.

    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

  • James Sharpe replied

    Okay, I figured that one out.  The table name was Backup.  It must be a reserved word, because as soon as I changed the table name to Backups, everything started working fine.  Two more quick questions then I promise to leave you alone.

    First, where can I get a list of variables that I can pass to MySQL through the table interface such as  %CURRENT_USER_ID%.

    Also, does the table sql syntax support joins?  I'm going to need to do 2.  All of the tables are connected by a field called SessionID which is only referenced by %CURRENT_USER_ID% in the session table.  If so, is there any special format for doing them?

    Thanks again for all of your help, I'm almost done and promise not to be any more trouble :)  Jim ...

  •  2,572
    Aleksandar replied

    Hello Jim.

    No problem whatsoever. That's why we're here.

    I'm glad You found a resolution to that problem. 

    You can see the detailed explanation on table elements, including placeholders on this link. You can read the whole article, it's quite useful for what You're trying to achieve. Detailed usage of placeholders is also listed in our documentation.

    As for "join" function, this is available to some extent. Please note that MySQL query constructor is not an ‘ultimate generator’, it should be treated as helper for constructing a suggestion of a query, by trying to ‘guess’ what you want. We are constantly working to improve it, but SQL is such a complicated and flexible language that fully automating the process for constructing queries is hardly possible.

    A great example tutorial with some useful information can be found here.

    Please let me know if this information was what You were looking for. If not, please don't hesitate to reach out to us. We're here to help.

    Best regards.

    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

  • James Sharpe replied

    Thanks so much for all of your help, I really appreciate it! If you would like, I will write up a little thing about how we get our data from our Windows Backup servers which are Server 2016 SQlite3, to our hosting servers which are Centos7, MySQL, Cpanel, Wordpress; using your WPDatatables.  I only found one efficient way to get it done, and would be more than happy to share the process with your users.  Maybe I can save somebody 20 hours of work playing with it to get it working right.

    Thanks again for everything, you guys are the best!

    Jim ...

  •  2,572
    Aleksandar replied

    Hello Jim.

    I'm glad we resolved the issue there.

    As for the instructions on how You get Your data from Backup servers, that would be much appreciated. You would help us and the other users very much. You can write it here, so it can be viewed by other customers, or You can send it to my e-mail address.

    Would it be OK if we were to post that to our documentation, if we find the tutorial helpful?

    If you have any more issues or questions feel free to open a new ticket, we will gladly help.

    Also, we'd greatly appreciate it if you could take a minute and leave a Review on CodeCanyon on this link. Thanks! 

    Best regards!

    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

  • James Sharpe replied

    That would be wonderful, I will both post it in a public ticket and send it to you in an email for inclusion in your documentation.

    Thanks again for all of your help,

    Jim ...

  •  2,572
    Aleksandar replied

    You're very welcome Jim.

    Thank You!

    You can post it here, since it is a public ticket, anyone who would search for the term would be able to find it.

    Best regards.

    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