Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4253
Latest: Ineedsmfhelp
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43242
Total Topics: 7516
Most Online Today: 118
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 104
Total: 104

Author Topic: most popular categories doesnt work  (Read 3077 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: 16428
    • 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: 16428
    • 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: 16428
    • 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
5603 Views
Last post November 12, 2007, 10:17:19 pm
by SMFHacks
43 Replies
21268 Views
Last post March 17, 2011, 08:44:22 pm
by Jimmie
9 Replies
7955 Views
Last post December 19, 2010, 12:01:09 am
by vkot
1 Replies
3973 Views
Last post July 25, 2013, 04:35:23 pm
by SMFHacks
1 Replies
2721 Views
Last post November 26, 2014, 04:19:21 pm
by SMFHacks

+- Recent Topics

is it possible to add support for odysee.com by SMFHacks
March 13, 2024, 10:53:28 pm

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

User Gallery Feature: move / bulk move images by SMFHacks
January 30, 2024, 05:48:25 pm

In the future it may be for smf 2.1.x? by smithloo
January 30, 2024, 12:55:34 am

Powered by EzPortal