"Dave Carrera" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi All
>
> I would like to know how to count how many downloads of a file I have on
my
> site is downloaded and display something like " file.name downloaded xxxx
> times" on my page.
>
> I have this idea using mysql db.
> table files
> ID int autoincrment,
> file_name,
> URL,
>
> I believe this would utilise something like the count() function but I
> haven't used this yet

Depends whether you want to track any additional information, like the IP of
the downloader or a timestamp; if so, you need a separate table with
per-download entries.

If all you want is a count, I would just add a field to the file table...
UPDATE TABLE files SET download_count=download_count+1 WHERE ID=$fileId.



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to