sql - Nested MySQL select error -


i'm trying make following transaction work, mysql error near select. i've double-checked column names correct.

error message

you have error in sql syntax; check manual corresponds mysql server version right syntax use near 'insert articles (catid,content,title,keywords,isactive) (selec' @ line 2

sql

start transaction;  insert articles (catid,content,title,keywords,isactive)  (select 1, pendingarticles.content, pendingarticles.title,  pendingarticles.keywords, 1  pendingarticles  pendingarticles.id=1); delete pendingarticles id=1;  commit; 

update

the code works. both insert - select part, , delete part. something's wrong transaction. perhaps ;? or db server can't transactions?

myisam engine not support transactions. myisam engine transaction support

to support transactions have change engine f.e. innodb. setting storage engine


Comments

Popular posts from this blog

javascript - JS causing window size to be bigger than necessary - Dropdown bug -

php - Calling a template part from a post -

How to mention the localhost in android -