Welcome Guest, Not a member yet? Register   Sign In
delete file and DB entry
#3

[eluser]Jondolar[/eluser]
Even if your unlink fails, you might still want to remove the database record. You don't know if it failed because the file is missing or because of permissions or any other reason. You might want to log the fact that the delete failed and still delete the database record.

If you are concerned about the number of lines required, you could just write your own query:
mysql_query('delete from ed_files xxx');

You can also use Active Record caching (see the bottom of this page)
http://ellislab.com/codeigniter/user-gui...ecord.html
That should save you a few lines.


Messages In This Thread
delete file and DB entry - by El Forum - 06-01-2009, 11:01 AM
delete file and DB entry - by El Forum - 06-01-2009, 11:43 AM
delete file and DB entry - by El Forum - 06-01-2009, 04:22 PM
delete file and DB entry - by El Forum - 06-01-2009, 09:47 PM
delete file and DB entry - by El Forum - 08-14-2009, 09:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB