Facebook  Twitter 

SMFHacks.com

+- +-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 12382
Latest: ImportedPotato
New This Month: 1
New This Week: 1
New Today: 0
Stats
Total Posts: 40240
Total Topics: 7089
Most Online Today: 116
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 132
Total: 132

Author Topic: most popular categories doesnt work  (Read 845 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: 15117
    • 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: 15117
    • 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: 15117
    • 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
3949 Views
Last post November 12, 2007, 10:17:19 pm
by SMFHacks
1 Replies
2497 Views
Last post February 15, 2009, 09:41:19 pm
by SMFHacks
43 Replies
15497 Views
Last post March 17, 2011, 08:44:22 pm
by Jimmie
9 Replies
4838 Views
Last post December 19, 2010, 12:01:09 am
by vkot
1 Replies
2880 Views
Last post July 25, 2013, 04:35:23 pm
by SMFHacks

+- Recent Topics

Moving pictures to another user personal gallery by SMFHacks
Today at 11:08:43 am

Call to undefined function mysql_num_rows() by SMFHacks
July 30, 2020, 07:45:29 am

Problem with one videosite embedding by Hatshepsut
July 24, 2020, 01:25:08 am

Download System Lite by Rock Lee
June 03, 2020, 07:34:24 pm

Font question by SMFHacks
May 27, 2020, 08:15:26 am

Error message with latest SMF 2.1 Github build by Hatshepsut
May 25, 2020, 01:43:26 am

smfblog not working on 2.0.17 by tech9
May 20, 2020, 01:44:34 pm

Copyright removal by stbc
May 18, 2020, 01:27:57 am

Mod Verified User i can't square the image by Rock Lee
May 07, 2020, 07:56:10 pm

SMF4Mobile 2.0 released for SMF 2.0.x by SMFHacks
May 06, 2020, 12:13:14 pm

Powered by EzPortal