ChronoConnectivity v4 WHERE not working

tarun550 08 Mar, 2012
the WHERE is not working at all
i have tried all the possible combinations varying from including WHERE and without it,all type of commas but none is working...
plus as already pointed out the custom body code isnt working...only Autolisting is working as of now

please can u gt this thng done fast...

if its cleared i will buying the component but if its too late my client will not pay me and i wont be able to buy this component....
GreyHead 09 Mar, 2012
Hi tarun550,

I know that Max is working on fixing some bugs and will have a new release soon.

Meanwhile I've dug in the code and found a hack fix for the WHERE problem. Open the file components/com_chronoconnectivity/libraries/chronoconnection.php and add the line shown here around line 588
	function list_records(){
		$mainframe =& JFactory::getApplication();
		$database =& JFactory::getDBO();
		$tables_columns_names = array();
		$connection =& $this->connection_details; // <-- add this line
		//save table fields if needed


The Body box is working OK for me so I'm not sure how to debug that problem :-(

Bob

PS I also confirmed that it is not possible to use ORDER BY in the WHERE box in this version.
tarun550 09 Mar, 2012
that suggestion worked but only for static filters...
m nt able to put php tags and work with dynamic filters...
please help asap
GreyHead 11 Mar, 2012
Hi tarun550,

Yes that's correct :-( I dug a little further and have a hack that lets me use PHP in the WHERE box, so I can for example get this code to work
<?php
$filter = JRequest::getString('filter', '', 'get');
if ( $filter)  {
  echo "`title` LIKE '%{$filter}%'";
}
?>
One step further . . . this fix is to make this change in libraries/chronoconnection.php around line 604
		$where_sql = "";
		if(!empty($connection->where_sql)){
			// add the next two lines
			$where_sql = $this->get_custom_output('where_sql', array());
			$where_sql = " WHERE ".$where_sql;
			// comment out this line
			//$where_sql = " WHERE ".$connection->where_sql;
		}

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