WHERE condition

nebelparder 10 Nov, 2014
Hey there

Well, I created different forms and connections and have to say "Thank you!".
CC & CF are really great extensions.

Unfortunately I have actually a problem with the WHERE condition of my connections and no idea how to solve it. Let me describe the setting; well, I'm using the CC plugin to include 1 connection into the first article ("Overview") and 5 connections into the second article ("Detail").

The first article ("Overview") presents the ID, name, age and city of each of our team members. Here I would like to add a link leading to the second article and passing the id of the team member (stored in Model.memberId).

So, the link has to look something like "abc.com/teams/detail&user=123"
(where "123" is the value of Model.memberId for this member)

In the second article ("Detail") I would like to use the value of the variable "user" (passed by the url; in this example: 123) to create a WHERE condition. So it should only present the rows of member 123.


How is this possible?
I have really no idea and don't understand php as good as I should for that... 😢
Max_admin 10 Nov, 2014
Here is how you can customize the conditions based on a url parameter:

<?php
return array("Model.field" => \GCore\Libs\Request::data("user"));

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.