• Resolved Marleen M

    (@marleen-meert)


    I am working on php that should include one of my tables table based on a variable. For this, ideally the shortcode should include the name of the table (=the variable) in stead of the ID. To give an example, if my table ID is 1 and my table name is ‘team23’, if the shortcode could be [table name=team23 /] that would be ideal. But since this isn’t possible (I guess?), I could fetch the ID of the table belonging to the table name in the sql database. Could you please tell me where I can find the table ID in the sql databases please?
    TIA

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    I’m afraid that getting the ID from the table name will not really work, as TablePress does not use mySQL tables for data storage.

    Instead, if your names really are something like team23, just use these as your table IDs! Table IDs in TablePress don’t have to be numbers, but can also be simple text strings like that! That way, you could directly use the table ID.

    Regards,
    Tobias

    Thread Starter Marleen M

    (@marleen-meert)

    Brilliant! That’s even better! I just didn’t realize it was possible to change the IDs.
    Thank you Tobias.

    Best regards,
    Marleen

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias
    ?
    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

    Thread Starter Marleen M

    (@marleen-meert)

    I already have, 5 stars from me!
    ?????

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks, I really appreciate it!

    Best wishes,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Shortcode with table name’ is closed to new replies.