Liquid-Fire Posted June 3, 2006 Share Posted June 3, 2006 Something I have thought of for the current project I am designing has lead me to this question. Something in my new project to I want to focus on big is user permissions. only thing is that they are going to be changing all the time, not the permissions thought but types of permissions. what i mean by that is the admin let say added a section to the system, I want to have user to be able to have different permission for this section compared to other sections. now I can handle that fine, all I have to do and added more tables for that section for all the permissions. The problem comes when I want to delete a section. If I delete certain MySQL table does the data that was stored in those table for allentries in the table get deleted? can I delete fot the middle of the tbale and will all data for all entries be deleted? I think this is the way is goes but I just want to make sure.Thank YouRyan Zec Quote Link to comment https://forums.phpfreaks.com/topic/11083-adding-and-deleting-from-mysql/ Share on other sites More sharing options...
fenway Posted June 3, 2006 Share Posted June 3, 2006 I'm not sure I understand the connection between the deleting and the permissions. Quote Link to comment https://forums.phpfreaks.com/topic/11083-adding-and-deleting-from-mysql/#findComment-41485 Share on other sites More sharing options...
Liquid-Fire Posted June 3, 2006 Author Share Posted June 3, 2006 basically my question is that when i delete a row, all the information in for that row that was being stored by all the mysql entries for the database will be deleted when the row is delted, is this correct? having a hard time trying to work it hope you understand this way. Quote Link to comment https://forums.phpfreaks.com/topic/11083-adding-and-deleting-from-mysql/#findComment-41498 Share on other sites More sharing options...
fenway Posted June 3, 2006 Share Posted June 3, 2006 If you're asking if the related records (by foreign key) will be deleted, that depends on how you've set up your InnoDB constriants. MyISAM tables will not do this. Quote Link to comment https://forums.phpfreaks.com/topic/11083-adding-and-deleting-from-mysql/#findComment-41581 Share on other sites More sharing options...
Liquid-Fire Posted June 8, 2006 Author Share Posted June 8, 2006 let say i have a database with 3 rows/tables(can't remember which is which right now) called A, B, and C, each of them holding an int value. I create 1 entries for that DB with( call it ONE ):A = 100B = 200C = 300and 1 more entries with( call it TWO ):A = 400B = 500C = 600now I edit the DB itself by removing the C row/table(can't remember which is which right now) . where does the data store in the table go? and to be clear i mean where does value 300 for ONE go and where does value 600 for TWO go?I don't think i can explian much better than this. Quote Link to comment https://forums.phpfreaks.com/topic/11083-adding-and-deleting-from-mysql/#findComment-43033 Share on other sites More sharing options...
radalin Posted June 8, 2006 Share Posted June 8, 2006 They should be lost. As they are kept in the hdd. Delete rule for hdd s is loosing the data. There is a recycle bin for win or another os because of the os has written that way. I'm not sure if any db contains such a recycle bin as they are intended to be used by experienced users (for administration and other things). As I said, they should be lost. Quote Link to comment https://forums.phpfreaks.com/topic/11083-adding-and-deleting-from-mysql/#findComment-43094 Share on other sites More sharing options...
fenway Posted June 9, 2006 Share Posted June 9, 2006 This is really updating a column value, not adding/deleting records. There's no record of the old value anywhere -- you've changed the value, and that's that. Theoretically, if you have logging enabled, you could track down the original value, but that's a pain in the butt. If you really care, you need to keep your own logging tables, but that's often unnecessary. The real question is why you care -- regular backups can prevent accidental data loss by a stupid user, but some can some good boundary checks in the app itself. Please clarify. Quote Link to comment https://forums.phpfreaks.com/topic/11083-adding-and-deleting-from-mysql/#findComment-43546 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.