Welcome Guest, Not a member yet? Register   Sign In
File Log
#3

[eluser]haris244808[/eluser]
[quote author="TheFuzzy0ne" date="1364729894"]I think logging to the database would make much more sense. It would give you a lot more control over the data you could retrieve. For example, you'd be able to answer the following questions:

What files were created yesterday?
How many files were sent 7 days ago.
Who has created the most files?
Who has received the most files?

And the list goes on... I'm pretty sure you wouldn't be able to do that with plain text files.

Now, when a file is uploaded, the date of creation is stored in the database along with the file information. You could do with another table which tracks the movements. Every time it's sent to someone, add a row. You table would probably need to be something like this:

| file_id | sender_id | recipient_id | sent_on |

You might need to add more columns, but with that, you can index every column, and join the table to the other relevant tables.[/quote]

when u say "add new row"...u mean to insert the data and not to update it??

ex: User1(with id=1) creates a data and sends to User2(with id=2) ... now user2 modifies the data and sends it to user3..
Now when i click the log button of this file i want to show:
User1 created the file (date when was created)
User1 Sent fileSadfilename) to USer2 (date when was sent)
User2 Edit file(filename) (date when was edited)
User 2 sent file:filename to user3 ((date when was sent))

so here i have to vreate a table 'log' an whenever smth happens to insert a new data(row) to table??


Messages In This Thread
File Log - by El Forum - 03-31-2013, 02:18 AM
File Log - by El Forum - 03-31-2013, 04:38 AM
File Log - by El Forum - 03-31-2013, 08:05 AM
File Log - by El Forum - 03-31-2013, 09:02 AM
File Log - by El Forum - 03-31-2013, 09:12 AM
File Log - by El Forum - 03-31-2013, 09:18 AM
File Log - by El Forum - 03-31-2013, 09:30 AM
File Log - by El Forum - 03-31-2013, 11:43 AM
File Log - by El Forum - 04-01-2013, 03:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB