Is it normal that if I delete something from MySQL manually and not through the admin panel on the website, the website will not work properly?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
17 views
Hello.
Let's say I registered a user and created a publication on his behalf. And then I went to PhpMyAdmin and deleted the user. And published author is an empty string instead of, say, the string "User deleted".
Is it normal for a site? Or to not be? That is, do I need to consider that someone can get into MySQL and delete any entry? Or... that while creating a new user on the hosting service may occur any issue in which the user is created, but the related tables will not be filled? What website will not work properly. So, too, maybe?
by | 17 views

4 Answers

0 like 0 dislike
If you remove the user and will be an empty string instead of "User deleted" - the site is quite well-designed. These things need to finish in the course of operation: a) if empty result, then write it, and if not remove and add a new field 1, we will write "User is banned" (all of a sudden then want that) and throughout the site to check this field for a unity and do respectively. actions, etc.

Do I need to consider that someone can get into MySQL is not necessary to consider. If someone is going to climb, the site is not only yours :)

About the failure on the host when adding - it is almost impossible.
Even if the user is not 1 table, and then logging will occur for 0.01 sec. or faster.
A chance that the entry in table 1 would happen, and to another in no time - very, very small :)
Although under certain conditions this could be, for example, when loading large volumes
by
0 like 0 dislike
No one in the base of the climb should not, except for creating tables and columns, and that this should be through migration.

You are lucky that the "author" of an empty string, not a critical error for the lack of the variable.

In General, you have too many questions on the most part it is impossible to give a definite answer
by
0 like 0 dislike
But if someone comes in via FTP and remove the core of the site is also the developer must consider?
A problem with the hosting, the integrity and consistency of data is one issue. The elephant in the room (the idiot that has direct access where they shouldn't) - is quite different.
by
0 like 0 dislike
If the deletion of any element in the database table destroys the whole system, the database is designed wrong: somewhere not specified primary keys, somewhere lowered the logic of removing elements (e.g., cascade). Another thing that access the database directly has only a system administrator and work directly with tables is not recommended (but possible, if cautiously).
by
110,608 questions
257,186 answers
0 comments
38,662 users