Forums

Reading database based on variable

scoutingsintpatrick 12 Jun, 2019
I'm running in to an issue with chronoconnectivityV6. I have a database with subscriber information. These subscribers are divided in groups, for instance group 1, group 2, group 3.

in my current set-up i have a event page per group, the event page per group calls a couple of views per group (for instance: a list and a count). and the list view calls an read function per group. So in this set-up i have 3 events, 3 list views, 3 count views, 3 database reads etcetera.

In my opinion this should be easier if i can use an variable to change group value the read function to read the database, then i only need one event, with one view and the selection of the data in the array is based on the variable that is used as an input in the read function.

attatched is the current connection as it has been build.
healyhatman 12 Jun, 2019
So do you mean look for a VALUE in the array based in your variable, or change the FIELD you're looking for?
scoutingsintpatrick 13 Jun, 2019
Yes, i want to change the db read function based on the page i'm viewing with an invisible variable.
healyhatman 13 Jun, 2019
Then you need different read_data actions unfortunately. The read_data action can have variable values, not variable field names or variable tables. Only other way would be to do it yourself in PHP
This topic is locked and no more replies can be posted.