Storing SQL in MySQL: Insert as Text?
Working in a team environment, each one of us has put together our own list of SQL statements that we use to help with our day to day job functions. As the case often is, there may be some redundancy with this, and we are often in need of each other's statements. To circumvent this, I'm looking to put together a small app that can be used to store and search for these SQL statements.
To begin with, I'm keeping it basic, just开发者_JAVA百科 storing and searching the statements. This may build out to be the actual execution at some point in the future, but I'm not concerning myself with this at the time.
This will be built with PHP and MySQL - Should I store the SQL as text, or is there something that I need to be concerned with?
text should be fine. you will also want a name (label) and possibly a descriptive field to let people know what it does in plain english.
Any particular reason these aren't just stored in the database as stored procedures?
Or in your version control system as scripts?
精彩评论