Sort not working

rstevens 15 Jun, 2013
On the Data Displayer tab of the DB Multi-Record Loader action is an Order Fields box. I added a field LName and the column header LName becomes clickable so that the columns can be sorted. However, when I click on it nothing happens. The url ends with &order=LName&direction=asc, so it should sort, but it doesn't. Any idea what I need to do to make it work?
Max_admin 16 Jun, 2013
Hi,

Do you have model name ? if yes then you may need to add it before the column name:

Model.LName

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
rstevens 16 Jun, 2013
By model name, I assume you mean model id. In any case, I do not have a model id.

I tried adding one, as you suggested and used Model.LName, but the column name won't be linked to the sort then.

Tried adding this as well...

<?php
if ( !isset($form->data['order']) || !$form->data['order'] ) {
$form->data['order'] = 'LName';
}
?>

...but that didn't work either.
Max_admin 21 Jun, 2013
Hi,

I'm not sure really, maybe there is some conflict some where else, for best listing results I suggest using ChronoConnectivity, you can do this task easier there, you can find few helpful tutorials on our FAQs page, just search for "CCV4"

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
rstevens 26 Jun, 2013
Thanks. Now the sort works, but it appears I am unable to add a simply query to state the number of records found in the table...

<font color="#3399FF" face="Arial"><b>Number of Members =
<?php
$db =& JFactory::getDBO();
$query = "SELECT COUNT(*) from chronoforms_data_Members";

$db->setQuery($query);
$num_rows = $db->loadResult(); // <-- see here
echo $num_rows; // and here (no $ in $echo)
echo ' on ';
print(Date("F j, Y, g:i a"));
?></b></font><br><br>
rstevens 26 Jun, 2013
Nevermind. I figured out the problem... turn of auto listing.
This topic is locked and no more replies can be posted.