Facebook  Twitter 

SMFHacks.com

+- +-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 12404
Latest: azaratir
New This Month: 10
New This Week: 0
New Today: 0
Stats
Total Posts: 39925
Total Topics: 7028
Most Online Today: 69
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 24
Total: 24

Author Topic: most popular categories doesnt work  (Read 209 times)

0 Members and 1 Guest are viewing this topic.

Offline fussilet

  • Theme Master
  • Full Member
  • ****
  • Posts: 103
    • View Profile
most popular categories doesnt work
« on: November 01, 2019, 04:57:01 pm »
hi all and smfhacks team


this code used to work properly
Code: [Select]
global $db_prefix, $scripturl;

$request = db_query("SELECT f.ID_FILE, f.ID_MEMBER, f.date, f.ID_CAT, f.title AS ftitle, f.totaldownloads,
c.title, m.realName, m.ID_MEMBER AS mID_MEMBER
FROM {$db_prefix}down_file AS f, {$db_prefix}down_cat AS c, {$db_prefix}members AS m
WHERE f.ID_CAT = c.ID_CAT
AND c.ID_CAT = BÖLÜM
AND f.approved = '1'
AND f.ID_MEMBER = m.ID_MEMBER
ORDER BY f.ID_FILE DESC
LIMIT 35",__FILE__,__LINE__);
while($row = mysql_fetch_assoc($request)) {
echo '<table width="100%" cellpadding="2" cellspacing="0">
<tr>
<td valign="top" class="smalltext"> <a href="',$scripturl,'?action=downloads;sa=view;id=',$row['ID_FILE'],'">',$row['ftitle'],'</a></td>
<td valign="top" class="smalltext" align="right">',$row['totaldownloads'],'</td>
</tr>
</table>';
}

but it doesn't work now for smf 2.0.15

can you help me pls

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 14969
    • View Profile
Re: most popular categories doesnt work
« Reply #1 on: November 01, 2019, 07:08:18 pm »
Use something linke
Code: [Select]
$request = $smcFunc['db_query']('', "SELECT f.ID_FILE, f.ID_MEMBER, f.date, f.ID_CAT, f.title AS ftitle, f.totaldownloads,
c.title, m.real_name, m.ID_MEMBER
FROM {db_prefix}down_file AS f, {db_prefix}down_cat AS c, {db_prefix}members AS m
WHERE f.ID_CAT = c.ID_CAT
AND c.ID_CAT = BÖLÜM
AND f.approved = '1'
AND f.ID_MEMBER = m.ID_MEMBER
ORDER BY f.ID_FILE DESC
LIMIT 35");
while($row = $smcFunc['db_fetch_assoc']($request)) {
echo '<table width="100%" cellpadding="2" cellspacing="0">
<tr>
<td valign="top" class="smalltext"> <a href="',$scripturl,'?action=downloads;sa=view;id=',$row['ID_FILE'],'">',$row['ftitle'],'</a></td>
<td valign="top" class="smalltext" align="right">',$row['totaldownloads'],'</td>
</tr>
</table>';
}

?>
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline fussilet

  • Theme Master
  • Full Member
  • ****
  • Posts: 103
    • View Profile
Re: most popular categories doesnt work
« Reply #2 on: November 02, 2019, 07:33:44 am »
thank for repling but it doesnt work

Code: [Select]
global $db_prefix, $scripturl;

$request = $smcFunc['db_query']('', "SELECT f.ID_FILE, f.ID_MEMBER, f.date, f.ID_CAT, f.title AS ftitle, f.totaldownloads,
c.title, m.real_name, m.ID_MEMBER
FROM {db_prefix}down_file AS f, {db_prefix}down_cat AS c, {db_prefix}members AS m
WHERE f.ID_CAT = c.ID_CAT
AND c.ID_CAT = 3
AND f.approved = '1'
AND f.ID_MEMBER = m.ID_MEMBER
ORDER BY f.ID_FILE DESC
LIMIT 35");
while($row = $smcFunc['db_fetch_assoc']($request)) {
echo '<table width="100%" cellpadding="2" cellspacing="0">
<tr>
<td valign="top" class="smalltext"> <a href="',$scripturl,'?action=downloads;sa=view;id=',$row['ID_FILE'],'">',$row['ftitle'],'</a></td>
<td valign="top" class="smalltext" align="right">',$row['totaldownloads'],'</td>
</tr>
</table>';
}

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 14969
    • View Profile
Re: most popular categories doesnt work
« Reply #3 on: November 02, 2019, 08:34:03 am »
What's the error?
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline fussilet

  • Theme Master
  • Full Member
  • ****
  • Posts: 103
    • View Profile
Re: most popular categories doesnt work
« Reply #4 on: November 02, 2019, 01:39:37 pm »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 14969
    • View Profile
Re: most popular categories doesnt work
« Reply #5 on: November 02, 2019, 01:43:28 pm »
Try
Code: [Select]
global  $smcFunc, $scripturl;


$request = $smcFunc['db_query']('', "SELECT f.ID_FILE, f.ID_MEMBER, f.date, f.ID_CAT, f.title AS ftitle, f.totaldownloads,
c.title, m.real_name, m.ID_MEMBER
FROM ({db_prefix}down_file AS f, {db_prefix}down_cat AS c, {db_prefix}members AS m)
WHERE f.ID_CAT = c.ID_CAT
AND c.ID_CAT = 3
AND f.approved = '1'
AND f.ID_MEMBER = m.ID_MEMBER
ORDER BY f.ID_FILE DESC
LIMIT 35");
while($row = $smcFunc['db_fetch_assoc']($request)) {
echo '<table width="100%" cellpadding="2" cellspacing="0">
<tr>
<td valign="top" class="smalltext"> <a href="',$scripturl,'?action=downloads;sa=view;id=',$row['ID_FILE'],'">',$row['ftitle'],'</a></td>
<td valign="top" class="smalltext" align="right">',$row['totaldownloads'],'</td>
</tr>
</table>';
}
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline fussilet

  • Theme Master
  • Full Member
  • ****
  • Posts: 103
    • View Profile
Re: most popular categories doesnt work
« Reply #6 on: November 02, 2019, 02:51:42 pm »
thank you so much Lord

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
3812 Views
Last post November 12, 2007, 10:17:19 pm
by SMFHacks
1 Replies
2376 Views
Last post February 15, 2009, 09:41:19 pm
by SMFHacks
43 Replies
14828 Views
Last post March 17, 2011, 08:44:22 pm
by Jimmie
9 Replies
4563 Views
Last post December 19, 2010, 12:01:09 am
by vkot
1 Replies
2783 Views
Last post July 25, 2013, 04:35:23 pm
by SMFHacks

+- Recent Topics

Update detect mobile mode PHP5 to PHP7 by Rock Lee
November 16, 2019, 07:18:13 pm

PHP error by davejo
November 12, 2019, 12:09:47 pm

Message Editor Pro Issues by SMFHacks
November 06, 2019, 09:58:33 pm

most popular categories doesnt work by fussilet
November 02, 2019, 02:51:42 pm

Change colors of Halloween theme by SMFHacks
October 24, 2019, 11:44:59 am

prettyurls - TroubleShooting.wiki by Rock Lee
October 10, 2019, 11:37:09 am

Some issues with adding and editing a listing by ajac63
October 07, 2019, 04:16:40 am

Problem update 1.1.21 to 2.0.15 by Rock Lee
October 06, 2019, 06:09:16 pm

[Mod]SMF 2.0.x PHP 7.2 Support by sah62
October 04, 2019, 01:46:00 pm

Ideas by shuban
October 03, 2019, 10:19:06 pm

Powered by EzPortal