TinyPortal

Development => Support => Topic started by: bfeo on October 02, 2008, 08:32:56 PM

Title: TinyPortal Downloads
Post by: bfeo on October 02, 2008, 08:32:56 PM
Rewritten to follow posting guidelines:

Link to my site: http://www.bfeo.org (You cannot get to it anyway, because it's not open to the public)
SMF version: SMF 1.1.6
TP version: TinyPortal v1.0.5 beta 1
Theme name and version: Mystic Jade, courtesy  of Bikken
Mods installed:The issue is related entirely with tinyportal, so the other mods should not be relevant.

Related Error messages: Recently I reinstalled my forums using an old backup.  Today I was adding new downloads (completely revamping the section), and I noticed that the database still holds information from files no longer uploaded.  It becomes noticeable when a person clicks the download section's stats link. 

Is there anyway to completely clear the download section's file information without harming the database?  I don't mind reuploading what I've done so far, so if current files are erased, that's fine.  I've already removed all files from the TPdownloads folder in my FTP.



Help much appreciated.   ;D
Title: Re: TinyPortal Downloads
Post by: G6Cad on October 03, 2008, 06:46:12 AM
Please read the Posting Guidelines.html (http://www.tinyportal.net/index.php/topic,581)
Title: Re: TinyPortal Downloads
Post by: bfeo on October 03, 2008, 01:29:13 PM
How's that?
Title: Re: TinyPortal Downloads
Post by: IchBin on October 03, 2008, 03:02:51 PM
You'll have to manually delete the downloads and views row data in the database. This query might work, but I'm not promising anything, so BACKUP before you do. :)

UPDATE smf_tp_dlmanager SET downloads=0, views=0, WHERE type="dlitem";

This assumes your database has an smf_ prefix.
Title: Re: TinyPortal Downloads
Post by: bfeo on October 03, 2008, 03:42:54 PM
How do I submit a query for the database?
Title: Re: TinyPortal Downloads
Post by: IchBin on October 03, 2008, 07:10:04 PM
That depends on your host. Most hosts have phpMyAdmin, and you can just put that in the SQL tab and run the query. You'll need to talk to your host to see what they have for managing your databases if you don't know that.
Title: Re: TinyPortal Downloads
Post by: G6Cad on October 03, 2008, 07:21:10 PM
A lot of great info on how to manage and work with your sql can be found here
http://www.mysql.com/
Title: Re: TinyPortal Downloads
Post by: bfeo on October 03, 2008, 07:48:19 PM
Thanks but I'm already familiar with PhpMyAdmin.  I have it and use it.  I looked at the query tab and became confused how to use it.
Title: Re: TinyPortal Downloads
Post by: IchBin on October 03, 2008, 08:35:40 PM
The sql tab. You copy and paste the code I posted. Then hit the submit button to execute the query.
Title: Re: TinyPortal Downloads
Post by: bfeo on October 03, 2008, 09:30:50 PM
Error

SQL query:

UPDATE smf_tp_dlmanager SET downloads =0,
views =0,
WHERE TYPE = "dlitem"

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE type="dlitem"' at line 1
Title: Re: TinyPortal Downloads
Post by: Ianedres on October 03, 2008, 09:50:10 PM
Remove the trailing comma before the WHERE statement...

UPDATE smf_tp_dlmanager SET downloads=0, views=0 WHERE type="dlitem";

@ich : $sqlfoo-- :buck2:
Title: Re: TinyPortal Downloads
Post by: IchBin on October 03, 2008, 11:02:50 PM
Good catch Ianedres.

$ianedres_ego++

:2funny:
Title: Re: TinyPortal Downloads
Post by: bfeo on October 03, 2008, 11:08:33 PM
It appears to not delete the item completely, including leaving file size.  All it appeared to do was reset number of times downloaded for every file to 0.
Title: Re: TinyPortal Downloads
Post by: IchBin on October 04, 2008, 01:26:01 AM
Well, if you have random items that aren't there, but are included in your stats, you'll probably have to go through your table and delete each row that you don't want there.