mysql - SQL Trigger Create Table statement -


i want create new table if inserts value users table. have trigger :

trigger phpmyadmin

but throws error :

mysql meldet: #1422 - explicit or implicit commit not allowed in stored function or trigger.

then tried create manually begin , end statement, throws error:

manually trigger

if same trigger simple statement delete users trigger works. know how create trigger create statement?

and optionally how create table name user_22 ( userid users insert)?

all data definition language (ddl) statements, such create, alter, drop, cause implicit commit of transactions, therefore not allowed in user defined function or triggers because these supposed run in same transaction sql statement invoked them. can create stored procedure inserts data in user table , creates table, not either.

moreover, seem have serious design flaw: should not create separate table each user. can store user related information in single table, user id tell user record belongs to.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -