File downloading count

Started on the old forum in February 2012 · view the original in the archive · old links redirect here

5 replies · 489 views · started 14 years ago · 1 min read

3 participants
Surya4u Junior · 29 posts #1

Anyone can tell me that code which show how many times file has been downloaded.

m4ster_v4 Developer · 125 posts #2
//UPDATE EACH TIME DOWNLOAD
$wow = mysql_fetch_array(mysql_query("SELECT * FROM download WHERE pro='".$id."'"));
$wow = $wow[downloaded]+1;
$awesome = mysql_query("UPDATE download SET downloaded='".$wow."' WHERE pro='".$id."'");

//COUNT DOWNLOAD IN TIME
$pro = mysql_fetch_array(mysql_query("SELECT * FROM download WHERE pro='".$id."'"));
echo "Downloaded: $pro[downloaded] times";

//LEGEND
download = Table name
pro = Column name
downloaded  = Column name
$id = File id

*** edited by metulj *

  • coded by m4ster_v4 * dont fking abuse my nickname ?

Visit my WEBSITE Project: http://www.aspirewap.net

m4ster_v4 Developer · 125 posts #3

Seem someone angry. We can't use their name. very weird. Not list on TOS. TERM AND CONDITION edit my post freely, delete my signature.

Btw. Good Luck For you surya4u. This is my code hope it will help you..

Visit my WEBSITE Project: http://www.aspirewap.net

something else Fellow · 2,296 posts #4

no offense mater_v4 you obiously like coming to coding talk as otherwize you wouldnt keep posting. what ever has been deleted has been done for a reason .... now unless you are willing to take coding talk to courts over there terms and conditions you are digging your own grave.

Also you can reduce your number of sql calls by using:

$awesome = mysql_query("UPDATE download SET downloaded=downloaded+1 WHERE pro='".$id."'");

😉

Surya4u Junior · 29 posts #5

@master_4v my "autoindex script" has not mysql .Please tell mi without mysql code

m4ster_v4 Developer · 125 posts #6

something else wrote: no offense mater_v4 you obiously like coming to coding talk as otherwize you wouldnt keep posting. what ever has been deleted has been done for a reason .... now unless you are willing to take coding talk to courts over there terms and conditions you are digging your own grave.

Also you can reduce your number of sql calls by using:

$awesome = mysql_query("UPDATE download SET downloaded=downloaded+1 WHERE pro='".$id."'");

;)

I know it. but it's not have any offense on my post. if i did free post it's okay to delete and edit. i just put my idea. But. nevermind. I'm a newbie. A lot of master here.

Surya4u just use text file. Ask master. i don't know how.

Visit my WEBSITE Project: http://www.aspirewap.net

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close