Okay
  Public Ticket #2050046
display only particular data
Closed

Comments

  • Jure Novak started the conversation

    Hello,

    I'm testing the wpdatatables plugin and it seems it can do more or less everything to connect our mysql register with wordpress. Actually there's only one thing which I'm unable to achieve currently and it goes like this.

    Let's say we have a database with the following structure:

    id, name, address, details, email
    1, jure novak, address 1, some data, [email protected]
    2, marko hatlak, address 2, some data, [email protected]

    I would like to use only one particular line of data from that table and display it inside one wordpress page using fixed variables. Actually, how would be even able to do this? Maybe using some kind of modified URL (for instance: http://domain.com/page?mysqlid=1). Furthermore, how can I then display only particular fields so the whole page the looks something like:

    My name is: {name} and my address id {address}.
    My email address is: {email}

    Actually, I see it's possible to do something similar with wpReportBuilder, but only using predefined .doc or .xls documents and also only with filtered fields from table. Here I'd like to do it the other way around, so I'll be able to display only particular line of data from mysql table inside a post or page.

    Also second question. Is there an option somehow to format an output table on frontend so it's actually not displayed as a table, but similar to what wpreportbuilder can do? In other words, I wouldn't want to return the filtered results as a simple standard table, but like a list of details, for instance:

    filtered table returns:

    id, name, address, details, email
    1, jure novak, address 1, some data, [email protected]
    2, marko hatlak, address 2, some data, [email protected]

    and I would like to return that same results in another format like:

    We have found two users with the following details:

    Name: jure novak
    Address: address 1
    Details: some data
    Email: [email protected]

    Name: marko hatlak
    Address: address 2
    Details: some data
    Email: [email protected]

    -

    Third and last question. Is there an option to use and display wpreportbuilder variables somehow inside a normal wordpress page or a post and not only as a word or excel template? So for instance, I could press "generate report" button and it wil be displayed as a search results below the table instead of excel or word export document?

    That's about it. Both questions are pretty similar I guess. In simple words, I'd just like to find a way to use specific data from table with some kind of variables and display it in varaious parts of page, similar to what wpreportbuilder does.

    Kind regards and thank you for your answer. Jure Novak.

  •  2,514
    Aleksandar replied

    Hello Jure.

    Thank you for your interest in our plugin.

    I am sorry to disappoint you, but unfortunately none of the questions here have a positive response. At least not with the plugin's built in features.

    You can display filtered results using Pre-Filter via URL, or adding predefined filtering values, but they would still be displayed in a table view.

    Extracting them from a table view can probably be achieved with some custom work, but that doesn't fall under included support of the plugin.

    As for the Report Builder variables - they do not work outside this add-on, so they cannot be implemented on another part of the website.

    You can take a look at our hooks and filters, if you're a developer, and you may find something useful there for your case. 

    Basically you can filter the values and change how the table appears on front-end, but it will still be displayed as a table, not as a form or something like that.

    Sorry for the inconvenience.

    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