• Resolved hfaero

    (@hfaero)


    I have a simple but dynamic csv file created by a PHP script with one column just for testing. So my page text looks like:

    [gdoc key=”http://hfaero.com/test.csv”%5D and this returns a list of flight numbers like ‘ANZ123’. For each flight number I want my users to click on it and be directed to a URL that is dependent on the flight number like:

    {flightnumber from csv file}

    I’ve added the gdoc_table_html function to my themes functions.php file and tried the following:

    [gdoc key=”http://hfaero.com/test.csv” gdoc_table_html query=” query=”select flight as flight”]

    but to no avail, I just get the return from test.csv

    I’ve also tried putting the HTML code in the base query (escaping the brackets as directed) so that it is visible in the CSV return but unless I have the full URL displayed I just get the test of the original query.

    Ideally I’d like to achieve this with a MySQL connection direct to my database.

    Is this something I’m ever going to achieve with this plugin?

    Thanks for any help.

    https://ww.wp.xz.cn/plugins/inline-google-spreadsheet-viewer/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Meitar

    (@meitar)

    You misunderstand the filter function; your HTML code should be part of the CSV field value, not the query.

    Thread Starter hfaero

    (@hfaero)

    OK, but since my CSV file is created from a MySQL query would I need to escape the <> characters in the MySQL query or not? Thanks for the help so far.

    Plugin Author Meitar

    (@meitar)

    You would need to ensure that valid HTML is inside the CSV field value. How you get it there is dependent on the specifics of your pipeline.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Table column hyperlink’ is closed to new replies.