I am working on a complicated report that have many views, and I need to create a table for the report. What I have done is created a blank MyISAM table that has my structure, and I am doing SELECT INTO report_session id. Then I am populated this table, and resorting for my individual views.
At the beginning and end of my script I am doing DROP TABLE IF EXISTS report_session_id, but I need to grant DROP privileges. All of this I am executing through PHP.
My question is, if there is a way to grant DROP privileges only on tables that begin with report_%?
I also see the privilege to create temporary tables. How would that work, and when are temporary tables destroyed, considering that this is a PHP script? Are temporary tables the same as memory tables?
Any help would be appreciated.