[英]Storing MySQL queries in the database (MySQL)
How would I store MySQL queries in a table within the MySQL database that they would be executed? 如何将MySQL查询存储在要执行的MySQL数据库中的表中?
I was thinking of using something like this: 我正在考虑使用这样的东西:
id int // unique ID of the query
statement varchar(1000) // actual query
var_list varchar(255) // comma separated list of variables to be used in the query
Is there anything else I should use, (or omit) for example the var_list
- should the variables be hardcoded in the statement itself? 还有什么我应该使用的(或省略),例如var_list
变量是否应在语句本身中进行硬编码?
没有理由在数据库中存储SQL查询。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.