Tables on the Fly with MySQL

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
pistolfire99
Forum Commoner
Posts: 58
Joined: Thu May 23, 2002 3:18 pm

Tables on the Fly with MySQL

Post by pistolfire99 »

Hello All,
Lets say I have 3 tables and I want to query them using INNER JOIN. What I would like todo is first query table1 and table2 and store the resultset in a "table that would be created on the fly", lets name it table10, then I would query table10 and table3 and use the results to display info on my website. Is something like this possible. Does MySQL support creating tables on the fly? and if yes? then how do I go about doing something like this.

Regards,
Pistolfire99
fractalvibes
Forum Contributor
Posts: 335
Joined: Thu Sep 26, 2002 6:14 pm
Location: Waco, Texas

Post by fractalvibes »

It appears that you can create temporary tables. Read the section in the manual about Create Table:

http://www.mysql.com/doc/en/CREATE_TABLE.html

Don't know if PHP allows for the creation, definition of "recordsets" on the fly as with ASP/ADO - anyone know? They are usefull on that side.

Phil J
Post Reply