PHP / MYSQL - How to limit the database level in an application

I reviewed and examined related issues with the general question of managing database restrictions in an application compared to restrictions based on my own database, but my question is much more specific and specific regarding how to handle my own mysql restrictions in application logic written in PHP .

In other database languages ​​/ shells (e.g. ADO.NET) you put the database interaction in try / catch and this throws the right exception, is this the case with php?

Also, does strict ORM use the need for database level restriction?

+3
source share
2 answers

try/catch , . db , - sql, , , , ? , , , try/catch , . , , , PHP script, -, , , . , , PHP, db, , , SQL ( , ), try/catch.

. - , , . , PHP , 99% php -, ORM . , .NET , .

, - ? , , , .. , . , , , .

0

/ , (, ADO.NET), /, , php?

PDO... , Mysqli, , . PDOException... , " " " null"... / .

, ORM ?

, . , , db , , , PHP.

0

Source: https://habr.com/ru/post/1790130/


All Articles