I want to read the values from a database, then display the result of that query to an overview page. Is there some kind of method in Modx for querying database rows/fields and looping through them?
I know how to do this in asp, but I only know a
tiny little bit about php... I tried to modify the code from the following post
http://modxcms.com/forums/index.php/topic,33267.0.html but no success... nothing displays :-(
My database is called ’test’, my table is called ’contest’ and has 4 values (an ID as primary key and 3 string values).
Also, I tried making a chunk with a simple ’show current date’ function, but it only works if I call it like [[ShowTheDate]] , does not work when I use [[!ShowTheDate!]] , why is that?
Edit: I found this tutorial instead (
http://wiki.modxcms.com/index.php/DB_query_and_Placeholders ) and got it working!