PHP mysql\_query function doesn't allow multiple queries, which limits maximal report complexity. What is the best practice, if I need really complex reports generated, which require multiple temp tables and multiple queries?

**UPDATE:** My question is more about how to use MySQL complex queries in PHP, if mysql\_query only allows single query?