I want to store php code in Mysql database and I am wondering which data type I can use. I will store large amount of data with special characters like ",*,$ etc.
我想将PHP代码存储在Mysql数据库中,我想知道我可以使用哪种数据类型。我将使用特殊字符存储大量数据,如“,*,$等。
So which mysql data tpye I can use?
那么我可以使用哪些mysql数据?
//Why? See My other question
//为什么?请参阅我的其他问题
2 个解决方案
#1
1
Use TEXT .. but if you ever want to use eval(), rethink about storing code in db..
使用TEXT ..但如果您想使用eval(),请重新考虑在db中存储代码。
#2
2
Use a TEXT
column, if there is to be more than just a few characters of code stored.
如果要存储的代码不仅仅是几个字符,请使用TEXT列。
#1
1
Use TEXT .. but if you ever want to use eval(), rethink about storing code in db..
使用TEXT ..但如果您想使用eval(),请重新考虑在db中存储代码。
#2
2
Use a TEXT
column, if there is to be more than just a few characters of code stored.
如果要存储的代码不仅仅是几个字符,请使用TEXT列。