Forums

Passing Parameters/Tokens into ChronoConnectivity query

carlsore 05 Aug, 2013
I'm using ChronoConnectivity to display a list of branch contact information. When you first visit the page, it lists all of the branches, and includes links to access the detailed information (currently displayed by referencing a ChronoForm and passing the cf_id as a token).

What I'd like to do instead is to somehow use that link to pass that token to another ChronoConnectivity page, so that I could display the data it'd bring back without having to show it in text boxes (ie: from a form).

How would I code a parameter/token into the WHERE clause of a ChronoConnectivity connection?
carlsore 07 Aug, 2013
Figured it out! In case anyone else was wondering, use the JRequest::getInt function (or getString, or whatever applies for your case):

<?php
$cf_id = JRequest::getInt('cf_id', '', 'get');
$db =& JFactory::getDBO();

$query = "
    SELECT *
        FROM `ChapterDirectory`
        WHERE `cf_id` = $cf_id;
";


Once you have that set up, then you can pass it like any other PHP parameter through the link - ?cf_id=42, etc.
kate_ee 24 Jan, 2014
Hi Carlsore,


Where should I put this code in ? "general" --> "where sql" or "Frontend List setting" --> "header" ??

thank you in advance

Kate
GreyHead 24 Jan, 2014
Hi kate_ee,

Sorry, I can't help with this. I can't work out what problem carlsore was solving.

What exactly do you need to do?

Bob
This topic is locked and no more replies can be posted.