Please explain how it doesn't work - ie. you get an error (show that
to us); the download counter doesn't increase; or other information
that you can provide us, then maybe we will better be able to help you
along :)

Turn on debug, copy/paste the SQL statements into this correspondance
also.

Enjoy,
   John

On 9 Aug., 12:54, taqman filler <[email protected]> wrote:
> I need to count download cakebaker guide me to use
>
> $this->MyFile->updateAll(array('Script.download_counter'=>'Script.download_­counter+1'),
> array('Script.id'=>40));
>
> I put it in
>
>    if ($id != null) {
>             $file = $this->Script->findByid($id);
> $this->MyFile->updateAll(array('Script.download_counter'=>'Script.download_­counter+1'),
> array('Script.id'=>40));
>             header('Content-type: ' . 
> $file['Attachment']['file_content_type']);
>             header('Content-length: ' .
> $file['Attachment']['file_size']); // some people reported problems
> with this line (see the comments), commenting out this line helped in
> those cases
>             header('Content-Disposition: attachment; filename="' .
> $file['Attachment']['file_name'] . '"');
>             echo $file['Attachment']['file_object'];
>
>             exit();
>
> It's doesn't work

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to