We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 48238
    • 2 Posts
    Hello guys,

    I've made an android application which selects my news pages content directly from the ModX PhyMyAdmin database (title, content) and shows them on my app, and I can modify them in my ModX site.

    This is how I select my news pages
    $result = mysqli_query($con,"SELECT * FROM modx_site_content WHERE parent='33' AND published='1'");

    Now I'm having a little trouble to select template variables, which include images for my specific news page. I just want to show those images on my news page in my Android application.

    I know i can find them in my modx_site_tmplvar_contentvalues table, but I don't know how to select only those news image tv's

    Can please somebody help me with this problem?

    [ed. note: sybrenb last edited this post 12 years, 3 months ago.]
      • 4172
      • 5,888 Posts
      wouldn't it be better, to call modx for a xml or json - response and use the MODX-API or existing snippets to get the output created?

        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 3749
        • 24,544 Posts
        As you found, the actual template variable values are in the modx_site_tmplvar_contentvalues table.

        The fields are:

        tmplvarid  (integer)  (ID of the TV)
        contentid  (integer)  (ID of the Resource)
        value  (string)
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 48238
          • 2 Posts
          Thank you guys