Okay
  Public Ticket #3185585
How do i show Attachment Image from ID in column
Closed

Comments

  • Vo started the conversation

    Hi, i have a custom mysql table with a column contain list comma seperated of ID attachments :  "19,25,50"

    my question is, is there any way that i can use php function to show up Image from attachment ID ?

    i have php function but i don't know how to use that function for that column

    thanks

  •  1,850
    Miloš replied

    Hi, Vo 

    Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.

    -

    I am not sure if i fully understand your use case about the ID's of the attachments.

    -

    For example, if you have a unique row Identifier as an integer column in your database table,

    and in another column you got images,

    in this case, you can easily use our foreign key relation feature.

    This will enable you to pull an SQL Query to make a new table in our plugin,

    and you can pull an integer column that is going to serve as an ID,

    then later in our plugin you will change it to string column type - and you can create a foreign key relation to it.

    You can set what is the "Store value",  that is the integer column from the related table;

    and you can choose any "display value" from any other column in order to pull the image.

    Please check a detailed example of our foreign key feature here.

    -

    Let me know if this helpssmile.pngThanks

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    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