Facebook  Twitter 

SMFHacks.com

+- +-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 12358
Latest: KekoWorld
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 40096
Total Topics: 7060
Most Online Today: 63
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 51
Total: 51

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

+- Recent Topics

[Mod]Telegram AutoPost Bot by SMFHacks
April 06, 2020, 03:38:36 pm

[Mod]SMF2WPBridge - Wordpress Login Bridge by SMFHacks
April 04, 2020, 07:16:59 pm

BUG Message Editor Pro1.0.5 by marcimila
April 04, 2020, 09:01:21 am

MOVED: BUG Message Editor Pro1.0.5 by SMFHacks
April 03, 2020, 07:54:07 pm

Only variables should be passed by reference by Zaphod
April 02, 2020, 11:19:11 am

Cannot install Gallery Pro on SMF 2.1 RC2 by Hatshepsut
March 19, 2020, 12:55:00 am

Newbie questions by SMFHacks
March 08, 2020, 09:28:17 am

Update detect mobile mode PHP5 to PHP7 by Plus
March 05, 2020, 11:19:05 am

Just a hello by Plus
March 05, 2020, 11:05:56 am

Enotify Copyright Problem by SMFHacks
March 04, 2020, 09:21:09 pm

Powered by EzPortal