Hi there,
I prepared a multiple rows table with the DB Multi Record Loader CFV4 (it is an open calendar of events). The table appear following the sorting order of 'cf_id', but I need that the sorting order is based on the 'date' field.
I could not find a way to solve this issue. Any clue ?
Thanks in advance...
Here is the code of the table:
I prepared a multiple rows table with the DB Multi Record Loader CFV4 (it is an open calendar of events). The table appear following the sorting order of 'cf_id', but I need that the sorting order is based on the 'date' field.
I could not find a way to solve this issue. Any clue ?
Thanks in advance...
Here is the code of the table:
<p><strong>Road Racing 10/</strong></p>
<table style="width: 540px;" border="1" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="width: 20px;"><span style="font-size: 8pt;"><strong>EMN</strong></td>
<td style="width: 40px;"><span style="font-size: 8pt;"><strong>Date</strong></td>
<td style="width: 70px;"><span style="font-size: 8pt;"><strong>FMN</strong></td>
<td style="width: 120px;"><span style="font-size: 8pt;"><strong>Title</strong></td>
<td style="width: 120px;"><span style="font-size: 8pt;"><strong>Organiser</strong></td>
<td style="width: 90px;"><span style="font-size: 8pt;"><strong>Tel/Fax</strong></td>
<td style="width: 40px;"><span style="font-size: 8pt;"><strong>Online</strong></td>
</tr>
<?php
foreach($form->data['opencalendar_rr'] as $detail):
?>
<tr>
<td rowspan="2" valign="top"><span style="font-size: 7pt;"><?php echo $detail['cf_id'] + 100; ?></td>
<td valign="top"><span style="font-size: 7pt;"><?php echo $detail['date']; ?></td>
<td valign="top"><span style="font-size: 7pt;"><?php echo $detail['fmn']; ?></td>
<td valign="top"><span style="font-size: 7pt;"><?php echo $detail['title']; ?></td>
<td rowspan="2" valign="top"><span style="font-size: 7pt;"><?php echo $detail['organiser']; ?></td>
<td valign="top"><span style="font-size: 7pt;">Tel <?php echo $detail['telephone']; ?></td>
<td valign="top"><span style="font-size: 7pt;"><a href="mailto:<?php echo $detail['email']; ?>">Email</a></td>
</tr>
<tr>
<td valign="top"><span style="font-size: 7pt;"><?php echo $detail['enddate']; ?></td>
<td valign="top"><span style="font-size: 7pt;"><?php echo $detail['country']; ?></td>
<td valign="top"><span style="font-size: 7pt;"><?php echo $detail['location']; ?></td>
<td valign="top"><span style="font-size: 7pt;">Fax <?php echo $detail['fax']; ?></td>
<td valign="top"><span style="font-size: 7pt;"><a href="<?php echo $detail['website']; ?>">Website</a></td>
</tr>
<?php
endforeach;
?>
</table>
<p></p>
Hi petermazzi,
I seem to remember that I got the Order Fields box (on the Data Diplayer tab) to work if I turned Enable Pagination to Yes - but someone else couldn't get this to work. You might also try putting ORDER BY `xxx` in the WHERE box after any where code - that might work.
Bob
I seem to remember that I got the Order Fields box (on the Data Diplayer tab) to work if I turned Enable Pagination to Yes - but someone else couldn't get this to work. You might also try putting ORDER BY `xxx` in the WHERE box after any where code - that might work.
Bob
I tried the first option but it does not work. The second option is not very clear what kind of code should I put and where. Could you please clarify for me ?
Thanks in advance for your precious help...
Thanks in advance for your precious help...
Hi petermazzi ,
In a MySQL query the ORDER BY clause comes after the WHERE clause so you can sometimes fool the code by putting 'WHERE xxx ORDER BY yyy' in the WHERE box - this worked with the earlier versions of CC. In this case you don't want the WHERE word included in there so you'd put something like
Bob
In a MySQL query the ORDER BY clause comes after the WHERE clause so you can sometimes fool the code by putting 'WHERE xxx ORDER BY yyy' in the WHERE box - this worked with the earlier versions of CC. In this case you don't want the WHERE word included in there so you'd put something like
ORDER BY `column_name`
if there is no WHERE clause or `some_column_name` = 'xxx' ORDER BY `column_name`
if there is.Bob
Hi,
Please try this code in the WHERE SQL box:
Regards,
Max
Please try this code in the WHERE SQL box:
1=1 ORDER BY `date` ASC
Regards,
Max
This topic is locked and no more replies can be posted.