php - The best way to copy data from one table to other ones -
i have 1 main table, , need copy data others. whole idea name of tables have copy dynamic (it foo + 1 of columns of main table).
for example, if have:
insert maintable (id, addtoname, somedata) values (1, 234, 'foo data');
i need copy data to: othertable234 ( somename + addtoname column )
i tried mysql triggers, after research found out it's not allowed have dynamic table names.
the other thing have in mind, build php daemon script, copy data every 1-10 minutes. concerned memory , performance issues.
so, thing best solution deal kind of problem?
you can use scripting language this, , use scheduler (cron, windows scheduler) run every 10 minutes. actual script needs issue a
create table tablename select ...
so complexity how tablename derived.
Comments
Post a Comment