What to do what not to write queries in code?

Query bindingon in PDO looks something like this:
$q=$pdo->prepare(" INSERT INTO `table` SET data=:data, time=NOW() ");
try {
} catch (PDOException $e) {
 // the error handling function

From the large number of requests code growing strongly, and a try / catch to write every time too, only puttee code produce?
In this connection some questions:
1) What do I need CRUD class or ORM wrapper of some kind?
2) How is this class / function to transmit data if the data to insert bindata, and tables are not bindata if they will be in the variable it directly in the query string to insert directly
3) How to pass things which are not type variables str=str+1 or NOW() or INTERVAL DAY()+1
In General, advise that be sensible but not too fancy, and some will start Doctrine... ))

Can independent things someone can suggest something https://github.com/search?l=PHP&o=desc&q=pdo+crud&...
July 2nd 19 at 13:49
2 answers
July 2nd 19 at 13:51
You need to look, as is done in ORM frameworks like Yii2. Not necessarily go to framework, but the experience is well worth a draw from frameworks.
It is clear, then clarifying the question than the ORM from the CRUD essentially different. Well it is clear that it is working with objects, sharpened, but beyond that... - Tyreek.Stoke commented on July 2nd 19 at 13:54
: It's a different thing altogether to explain the reluctance to work with the framework, and it is better in several different and understand. - mazie.Towne commented on July 2nd 19 at 13:57
: the main objective of ORM is to convert the data from the database to objects and Vice versa the objects in the data. Need to work with objects rather than messing with the raw data. - cassidy.Green commented on July 2nd 19 at 14:00
July 2nd 19 at 13:53
Use Doctrine Luke!
Sometimes if update 400 million records in a minute? Th-t I'm not sure... - Tyreek.Stoke commented on July 2nd 19 at 13:56
Specifically for this case - dql/sql. What do you want, a silver bullet which is not?)) - mazie.Towne commented on July 2nd 19 at 13:59

Find more questions by tags PHP PDOCRUDORMMySQLPHP