4 ms·
From the code: INSERT INTO %s.%s SELECT * FROM %s.%s Yeah, good luck with that.
by Gigablah 12y ago
From the code:
INSERT INTO %s.%s SELECT * FROM %s.%s
Yeah, good luck with that.
- kstrauser 12y agoWhat's wrong with that? Assuming you escape the table names correctly, that seems reasonable. And if you can't escape the table names, you're going to have a hard time dynamically generating queries anyway. Parameterized queries are a baseline requirement for values, but are rarely supported by client libraries for things like table or schema names.
- Gigablah 12y agoNothing wrong with the syntax, it's just that if you're going to create an entire mirror of your database, you might as well use mysqldump. (Plus it'll actually be portable).