Users Download Log
Status: Beta
Brought to you by:
tsdogs
I wanted to try and let each user see when their file had been downloaded by listing it in the My Files section.
I added a new column in the files table called download, type datetime.
I then tried to workout your code in the file.inc.php serv file section so that after the download was complete, it would update the db. I used the following code which is clearly wrong as it breaks the site. with a server error.
app()->db->update('files',('download' => date('Y-m-d H:i:s') where id = $finfo[$num]['id']))
Could you let me know the correct syntax for this please.
Anonymous
Obviously the syntax is not correct. If you look at the db modules the syntax is
function update($tbl,$values,$keys = array(),$fields = array())
Which should translate to:
app()->db->update('files',array('download'=>date('Y-m-d H:i:s')), array('id'=>$finfo[$num]) );
many thanks, i had to use
app()->db->update('files',array('download'=>date('Y-m-d H:i:s')), array('id'=>$finfo[$num]['id']) );
:)
you should fix your DONATE button
yeah sure, my fault :)