I am not sure I understand your question. Supposing I do, you could use a mySQL manager like "mySQL front", or build a form page with a field and a submit button for each particular query you think you're going to need. A function to connect to the database would be in order in that case.
Luciano ES
Santos, SP - Brasil