Hi all,
I want to connect to a table that has no relationship to the main table in my CC.
I want to use this table to build the WHERE query in my CC listing.
It's basically a multi field search listing.
I am passing the id of the row from the unrelated table using the URL pass method.
That works fine, and get the correct entry being passed.
I'm then using the $param variable to query the connection
i am not getting any results from the connection.
I have been using
What i want to do is use the returned row to build my query in the WHERE box of the CC listing main table.
The debugger shows no data. i am aware that it shouldn't as the connection to the table isn't working properly.
Where am i going wrong? and is it even possible to do what i want.
I could build this with CF, but want to use the built in filtering of CC
Kind Regards
Allan
I want to connect to a table that has no relationship to the main table in my CC.
I want to use this table to build the WHERE query in my CC listing.
It's basically a multi field search listing.
I am passing the id of the row from the unrelated table using the URL pass method.
$param = JRequest::getInt('request_id', '', 'get');
That works fine, and get the correct entry being passed.
I'm then using the $param variable to query the connection
$db2 =& JFactory::getDBO();
$query = "
SELECT *
FROM `hma_requests`
WHERE `request_id` = $param;
";
$db2->setQuery($query);
$Request =& $db2->loadObjectList();
i am not getting any results from the connection.
I have been using
echo $Request->request_id ;
to try and see what resultsare returned, but i get nothing.What i want to do is use the returned row to build my query in the WHERE box of the CC listing main table.
advertised_price <= <?php echo "'{$Request['budget']}'" ; ?>
The debugger shows no data. i am aware that it shouldn't as the connection to the table isn't working properly.
Where am i going wrong? and is it even possible to do what i want.
I could build this with CF, but want to use the built in filtering of CC
Kind Regards
Allan