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.]
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?
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)