Forums

control DB multi record loader order

marklandry 31 Jan, 2012
Hi,
I've got a db multi record loader up and running - works great thanx to your tutorial.

Problem is that I need the order to be DESC, it seems like the default is ASC - either way, I need the order to be the reverse of what it is (I need it ordered by 'date_0')

Checked the forums but didn't see much - thanx for your help

Mark
GreyHead 31 Jan, 2012
Hi Mark,

Please see this thread. You'll see that I got the ordering to work by setting 'Enable Pagination' to 'Yes'.

Bob
marklandry 01 Feb, 2012
Hi Bob,
I did see that thread a couple of days ago - Under the data displayer tab I've got it set to yes and pagination set to top. I don't see a pagination option of "yes"

Anyway, not working
marklandry 03 Feb, 2012
Hey Bob
I still can't get this to work.

I have this in an event just before the multi record loader:
<?php
$form->data['direction'] = 'asc';
?>

In the record loader - > data displayer tab -> pagination dropdown I have it set to "top"
I've tried ASC and DESC and I've tried it with "enable data displayer" set to yes and no.

Am I missing something?

Thanx

Mark
marklandry 17 Mar, 2012
still trying to get this to work but no luck...
GreyHead 17 Mar, 2012
Hi Mark,

I got this code + settings to work OK with the #__contents table.
<?php
$form->data['order'] = 'title';
$form->data['direction'] = 'desc';
?>

DB Multi-Record Loader:
[list]
  • Basic tab - Table: xxx_content

  • Basic tab - Fields: id,title

  • Data displayer - Enabled: no

  • Data displayer - Pagination: Top or Bottom (but not with No)
  • [/list]
    The other boxes were either blank or had their default settings.

    Bob
    Max_admin 17 Mar, 2012
    Hi,

    Simply add this to the WHERE box:

    1=1 ORDER BY `field_name` DESC


    Regards,
    Max
    Max
    ChronoForms developer...
    Did you try ChronoMyAdmin for managing your Joomla database tables ?
    marklandry 26 Mar, 2012
    That broke it,
    But might be because of my overall where statement?
    
    <?php
    $user =& JFactory::getUser();
    $userid=$user->id;
    $id = $_GET["id"];
    ?>
    
    `cf_user_id` = <?php echo $id; ?>
    ORDER BY `date_0` DESC
    
    This topic is locked and no more replies can be posted.