If file has been quoted "noob stuck" - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: If file has been quoted "noob stuck" (/showthread.php?tid=59225) |
If file has been quoted "noob stuck" - El Forum - 09-07-2013 [eluser]FireMe[/eluser] Hi all, This is probably a noob question but the easy things always seem to stump me, I am working on a personal practice project because I am trying to get into php and mysql, codeigniter seems to be one of the best open source frameworks I believe, well I have not done so bad for my ability I have a login and register system with capatcha set up, I have a user upload page, a quote page. on the upload page I have a foreach statement for the files that the logged in user has uploaded, and there is a link/button for delete and get quote for each, what I want to do is not show the delete and quote buttons if a quote has been inserted into that database for that file_id. and that it really how would I do this my code below. also if there is a better way to do anything in my code i would appreciate any suggestions. controller function for upload page. Code: function upload() { controller function for quotes page Code: function quotes() { and the models Code: function get_all_files($user_id){ Thanks, And I will look forward from hearing from you FireMe If file has been quoted "noob stuck" - El Forum - 09-07-2013 [eluser]FireMe[/eluser] 85 views no replies, did I not post enough of my code for a reply? thanks in advance, FireMe If file has been quoted "noob stuck" - El Forum - 09-09-2013 [eluser]quasiperfect[/eluser] not sure about the whole system your building but i can give you a suggestion if the user doesn't change the files to often and has a lot of files instead of requesting every time from db request once cache the result and recache on delete and upload |