Bonjour , j'ai un composant joomla avec un slider où défile des témoignages et j'aimerai que ceci défile dans l'ordre d id décroissant ( plus grand vers plus petit ) et non croissant comme actuellement.
Visiblement le code à modifier est celui ci :
Le php n'est pas un language que je maitrise , avez vous une solution pour inverser l'ordre des id ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 <?php // no direct access defined('_JEXEC') or die; require_once JPATH_SITE . '/components/com_tlptestimonial/helpers/tlptestimonial.php'; //Add database instance $db= JFactory::getDBO(); //Pass query Limit by count parameter (Check XML) if($category>0){ $query="SELECT * FROM #__tlptestimonial_testimonial WHERE category=$category AND state=1 ORDER BY $ordering LIMIT 0,$testimonialcount"; }else{ $query="SELECT * FROM #__tlptestimonial_testimonial WHERE state=1 ORDER BY $ordering LIMIT 0,$testimonialcount"; } //Run The query $db->setQuery($query); //Load it as an Object into the variable "$rows $rows = $db->loadObjectList();
Merci.
Partager