开发者

PDO INSERT - More than one

I have a question how do you do when you need to more t开发者_StackOverflowhan 1 register in a database with PDO?

And every record has to be registered in the database, Can not give any error in all it has to be registered.

Example 6 register with PDO on a page.

But if the last record of the error? How do I delete the 5 that was already in the DB?, Best way to do this?

I'll have to pass all QUERY and verified in the IF one by one? or have a better way to do this?

Or this type of error will never occur?


I think transactions is what you need.

Here's another tutorial: http://www.phpro.org/tutorials/Introduction-to-PHP-PDO.html#11

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜