You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: helper.php
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -108,7 +108,7 @@ public static function getCustomlist1(&$params)
108
108
{
109
109
// recupere la connexion à la BD
110
110
$db = JFactory::getDbo();
111
-
$queryCustomlist = 'SELECT id,title, catid, created, created_by, modified, modified_by FROM #__content WHERE catid='.(int) $params->get('catidlist1').' AND state = 1 ORDER BY modified DESC LIMIT '. (int) $params->get('count');
111
+
$queryCustomlist = 'SELECT a.id,b.name, a.title, a.catid, a.created, a.created_by, a.modified, a.modified_by FROM #__content AS a LEFT JOIN #__users AS b ON a.created_by = b.id WHERE catid='.(int) $params->get('catidlist1').' AND state = 1 ORDER BY modified DESC LIMIT '. (int) $params->get('count');
112
112
$db->setQuery( $queryCustomlist );
113
113
$itemsCustomlist = $db->loadObjectList();
114
114
//print_r ($itemsCustomlist) ;
@@ -121,7 +121,7 @@ public static function getCustomlist2(&$params)
121
121
{
122
122
// recupere la connexion à la BD
123
123
$db = JFactory::getDbo();
124
-
$queryCustomlist2 = 'SELECT id,title, catid, created, created_by, modified, modified_by FROM #__content WHERE catid='.(int) $params->get('catidlist2').' AND state = 1 ORDER BY modified DESC LIMIT '. (int) $params->get('count');
124
+
$queryCustomlist2 = 'SELECT a.id,b.name, a.title, a.catid, a.created, a.created_by, a.modified, a.modified_by FROM #__content AS a LEFT JOIN #__users AS b ON a.created_by = b.id WHERE catid='.(int) $params->get('catidlist2').' AND state = 1 ORDER BY modified DESC LIMIT '. (int) $params->get('count');
125
125
$db->setQuery( $queryCustomlist2 );
126
126
$itemsCustomlist2 = $db->loadObjectList();
127
127
foreach ($itemsCustomlist2as &$itemCustomlist2) {
@@ -133,7 +133,7 @@ public static function getCustomlist3(&$params)
133
133
{
134
134
// recupere la connexion à la BD
135
135
$db = JFactory::getDbo();
136
-
$queryCustomlist3 = 'SELECT id,title, catid, created, created_by, modified, modified_by FROM #__content WHERE catid='.(int) $params->get('catidlist3').' AND state = 1 ORDER BY modified DESC LIMIT '. (int) $params->get('count');
136
+
$queryCustomlist3 = 'SELECT a.id,b.name, a.title, a.catid, a.created, a.created_by, a.modified, a.modified_by FROM #__content AS a LEFT JOIN #__users AS b ON a.created_by = b.id WHERE catid='.(int) $params->get('catidlist3').' AND state = 1 ORDER BY modified DESC LIMIT '. (int) $params->get('count');
137
137
$db->setQuery( $queryCustomlist3 );
138
138
$itemsCustomlist3 = $db->loadObjectList();
139
139
foreach ($itemsCustomlist3as &$itemCustomlist3) {
@@ -145,7 +145,7 @@ public static function getCustomlist4(&$params)
145
145
{
146
146
// recupere la connexion à la BD
147
147
$db = JFactory::getDbo();
148
-
$queryCustomlist4 = 'SELECT id,title, catid, created, created_by, modified, modified_by FROM #__content WHERE catid='.(int) $params->get('catidlist4').' AND state = 1 ORDER BY modified DESC LIMIT '. (int) $params->get('count');
148
+
$queryCustomlist4 = 'SELECT a.id,b.name, a.title, a.catid, a.created, a.created_by, a.modified, a.modified_by FROM #__content AS a LEFT JOIN #__users AS b ON a.created_by = b.id WHERE catid='.(int) $params->get('catidlist4').' AND state = 1 ORDER BY modified DESC LIMIT '. (int) $params->get('count');
149
149
$db->setQuery( $queryCustomlist4 );
150
150
$itemsCustomlist4 = $db->loadObjectList();
151
151
foreach ($itemsCustomlist4as &$itemCustomlist4) {
@@ -157,7 +157,7 @@ public static function getCustomlist5(&$params)
157
157
{
158
158
// recupere la connexion à la BD
159
159
$db = JFactory::getDbo();
160
-
$queryCustomlist5 = 'SELECT id,title, catid, created, created_by, modified, modified_by FROM #__content WHERE catid='.(int) $params->get('catidlist5').' AND state = 1 ORDER BY modified DESC LIMIT '. (int) $params->get('count');
160
+
$queryCustomlist5 = 'SELECT a.id,b.name, a.title, a.catid, a.created, a.created_by, a.modified, a.modified_by FROM #__content AS a LEFT JOIN #__users AS b ON a.created_by = b.id WHERE catid='.(int) $params->get('catidlist5').' AND state = 1 ORDER BY modified DESC LIMIT '. (int) $params->get('count');
161
161
$db->setQuery( $queryCustomlist5 );
162
162
$itemsCustomlist5 = $db->loadObjectList();
163
163
foreach ($itemsCustomlist5as &$itemCustomlist5) {
@@ -169,7 +169,7 @@ public static function getCustomlist6(&$params)
169
169
{
170
170
// recupere la connexion à la BD
171
171
$db = JFactory::getDbo();
172
-
$queryCustomlist6 = 'SELECT id,title, catid, created, created_by, modified, modified_by FROM #__content WHERE catid='.(int) $params->get('catidlist6').' AND state = 1 ORDER BY modified DESC LIMIT '. (int) $params->get('count');
172
+
$queryCustomlist6 = 'SELECT a.id,b.name, a.title, a.catid, a.created, a.created_by, a.modified, a.modified_by FROM #__content AS a LEFT JOIN #__users AS b ON a.created_by = b.id WHERE catid='.(int) $params->get('catidlist6').' AND state = 1 ORDER BY modified DESC LIMIT '. (int) $params->get('count');
173
173
$db->setQuery( $queryCustomlist6 );
174
174
$itemsCustomlist6 = $db->loadObjectList();
175
175
foreach ($itemsCustomlist6as &$itemCustomlist6) {
@@ -181,7 +181,7 @@ public static function getCustomlist7(&$params)
181
181
{
182
182
// recupere la connexion à la BD
183
183
$db = JFactory::getDbo();
184
-
$queryCustomlist7 = 'SELECT id,title, catid, created, created_by, modified, modified_by FROM #__content WHERE catid='.(int) $params->get('catidlist7').' AND state = 1 ORDER BY modified DESC LIMIT '. (int) $params->get('count');
184
+
$queryCustomlist7 = 'SELECT a.id,b.name, a.title, a.catid, a.created, a.created_by, a.modified, a.modified_by FROM #__content AS a LEFT JOIN #__users AS b ON a.created_by = b.id WHERE catid='.(int) $params->get('catidlist7').' AND state = 1 ORDER BY modified DESC LIMIT '. (int) $params->get('count');
185
185
$db->setQuery( $queryCustomlist7 );
186
186
$itemsCustomlist7 = $db->loadObjectList();
187
187
foreach ($itemsCustomlist7as &$itemCustomlist7) {
@@ -193,7 +193,7 @@ public static function getCustomlist8(&$params)
193
193
{
194
194
// recupere la connexion à la BD
195
195
$db = JFactory::getDbo();
196
-
$queryCustomlist8 = 'SELECT id,title, catid, created, created_by, modified, modified_by FROM #__content WHERE catid='.(int) $params->get('catidlist8').' AND state = 1 ORDER BY modified DESC LIMIT '. (int) $params->get('count');
196
+
$queryCustomlist8 = 'SELECT a.id,b.name, a.title, a.catid, a.created, a.created_by, a.modified, a.modified_by FROM #__content AS a LEFT JOIN #__users AS b ON a.created_by = b.id WHERE catid='.(int) $params->get('catidlist8').' AND state = 1 ORDER BY modified DESC LIMIT '. (int) $params->get('count');
197
197
$db->setQuery( $queryCustomlist8 );
198
198
$itemsCustomlist8 = $db->loadObjectList();
199
199
foreach ($itemsCustomlist8as &$itemCustomlist8) {
@@ -205,7 +205,7 @@ public static function getCustomlist9(&$params)
205
205
{
206
206
// recupere la connexion à la BD
207
207
$db = JFactory::getDbo();
208
-
$queryCustomlist9 = 'SELECT id,title, catid, created, created_by, modified, modified_by FROM #__content WHERE catid='.(int) $params->get('catidlist9').' AND state = 1 ORDER BY modified DESC LIMIT '. (int) $params->get('count');
208
+
$queryCustomlist9 = 'SELECT a.id,b.name, a.title, a.catid, a.created, a.created_by, a.modified, a.modified_by FROM #__content AS a LEFT JOIN #__users AS b ON a.created_by = b.id WHERE catid='.(int) $params->get('catidlist9').' AND state = 1 ORDER BY modified DESC LIMIT '. (int) $params->get('count');
209
209
$db->setQuery( $queryCustomlist9 );
210
210
$itemsCustomlist9 = $db->loadObjectList();
211
211
foreach ($itemsCustomlist9as &$itemCustomlist9) {
@@ -217,7 +217,7 @@ public static function getCustomlist10(&$params)
217
217
{
218
218
// recupere la connexion à la BD
219
219
$db = JFactory::getDbo();
220
-
$queryCustomlist10 = 'SELECT id,title, catid, created, created_by, modified, modified_by FROM #__content WHERE catid='.(int) $params->get('catidlist10').' AND state = 1 ORDER BY modified DESC LIMIT '. (int) $params->get('count');
220
+
$queryCustomlist10 = 'SELECT a.id,b.name, a.title, a.catid, a.created, a.created_by, a.modified, a.modified_by FROM #__content AS a LEFT JOIN #__users AS b ON a.created_by = b.idt WHERE catid='.(int) $params->get('catidlist10').' AND state = 1 ORDER BY modified DESC LIMIT '. (int) $params->get('count');
0 commit comments