This is a discussion on "Downloads display thing..." within the PHP Forum section. This forum, and the thread "Downloads display thing... are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Downloads display thing...
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Downloads display thing...
Hello again! I store my graphics in a MySQL database and this is the code I'm using to display them on my page:
Anyone knows? By the way, maybe I'm doing something wrong in phpMyAdmin? Both dcounter and pcounter are set to VARCHAR(5) not null Default: 0 |
|
|
|
#2
|
|||
|
|||
|
Re: Downloads display thing...
Me thinks the problem is here:
|
|
#3
|
|||
|
|||
|
Re: Downloads display thing...
Wow! Thanks so much! But I have another problem now, it won't count the downloads/previews. Do you know what it can be?
|
|
#4
|
|||
|
|||
|
Re: Downloads display thing...
Even with your code corrected, it wont count anything. It is just retrieving values from the database.
You need to be looking at the code that should be incrementing those values whenever a download takes place. |
|
#5
|
|||
|
|||
|
Re: Downloads display thing...
Do you know what code I need? Or at least what should I look for?
Thanks again! |
|
#6
|
|||
|
|||
|
Re: Downloads display thing...
I'm guessing that the code you have shown us thus far is not yours, original that is. Is that a fair guess?
Is this all the code you have? |
|
#7
|
|||
|
|||
|
Re: Downloads display thing...
Of course it isn't mine. (Is it a problem?) It's from this:
http://seabreezed.org/index.php?show...&page=layoutdb tutorial and it's all the code I have. |
|
#8
|
||||
|
||||
|
Re: Downloads display thing...
No, it's not a problem.
What do you mean by "count"? That variable is just a number that's stored in the database, it doesn't do any calculations. |
|
#9
|
|||
|
|||
|
Re: Downloads display thing...
Well for example if there are 10 downloads and you click on the download link it says 11. It shows how many times a file has been downloaded. Do you know how to make it count how many times a link has been clicked, because it only shows the number I put in the database?
|
|
#10
|
|||
|
|||
|
Re: Downloads display thing...
You need to have some code somewhere, hat every time the download link is clicked, this code is activated and it incremente the value in the database.
You will need to use and sql update script. |
![]() |
| Tags |
| mysql, php |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how do i add downloads | monstermunch | Starting Out | 2 | Feb 28th, 2007 23:50 |
| HTTP and FTP Downloads | EdgeWalker | Web Page Design | 4 | Feb 15th, 2007 19:35 |
| looking for a cms that easily allows downloads | saltedm8 | Other Programming Languages | 6 | Dec 14th, 2006 11:03 |
| How to accomplish automated downloads? | aarganesh | Classic ASP | 1 | Jun 12th, 2005 19:44 |
| Downloads | Dr.K | Web Page Design | 3 | May 19th, 2005 18:08 |