[eluser]haris244808[/eluser]
[quote author="TheFuzzy0ne" date="1364122520"]I'm sorry, but I'm confused... What is the 'came_from' field for, and what is the 'user_id' field for? Aren't they the same thing?
What should the came_from() method do that the show_files() method doesn't do?
I'm unclear on what's not working as expected. Please could you clarify?[/quote]
user_id holds the id of the user(the user id of the one to whom you sent, so later i can show the files depending on the user login) when he creates a file...
but this file can be forwarded to someone else later...so when it is forwarded it needs to hold the user id and update the came_from only (with the user_id of the one who forwarded that file)
so came_from will hold the id of the user who send the file and later if the file is forwarded will be updated to that users id (i store the id from the sesssion of the current user )
but the user_id will not change...it will be created when you create a file....(i store the id from the dropdown menu, where you can choose from a registered users)
and finaly with show_files i want to show all the file data BUT TOGETHER WITH THE first_name AND last_name OF THE USER WHERE came_from = users.id