php中 预处理与事务同时使用

WBOY
Release: 2016-06-02 11:28:28
Original
1058 people have browsed it

php预处理事务数据库

sql1,sql2两条语句分别插入到不同的表中,sql2某一个属性就是sql1插入后自增长的ID值,

我希望使用预处理来处理sql1和sql2, 同时希望他们执行的时候是在一个事务中, 现在问题就是, 事务中没提交的操作并没有真的插入到数据库中, 所以自增长的ID不存在,sql2插入出错, 肿麽办?

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!