(1)
(2)
For example: If there is a problem with my SQL statement, I output the information generated by the two functions.
There is also a set of functions:
Are, open the transaction, roll back the transaction, commit the transaction, and determine whether it is in the transaction.
1 errorinfo () 2 An array of error messages that contain error messages. 3errorCode ()4 error code 5 failure during SQL execution causes an error: 67
1 BeginTransaction (); 2 Open Transaction 3 rollback (); 4 rolling back a transaction 5 commit (); 6 Commit a transaction 7 intransaction (); 8 determine if you are in a transaction 9 Ten Lastinsertid () The value of the Auto_increment field that was finally formed.
1 another way to execute SQL. 2 differs from query () and the return value type is different. The Exec () return value type is integer. (Query () returns the object type). 3 The returned integer that represents the number of records that are affected by the current execution of SQL. 4 visible:5 query (), Execute Inquiry class, show,select, desc6 Exec (), non-query class, INSERT,DELETE,UPDATE,DDL
Note that the number of records affected may be 0. But it doesn't mean execution failed!
Php,pdo) Common functions