Page 1 of 1

Tables on the Fly with MySQL

Posted: Thu Jul 24, 2003 5:51 pm
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

Posted: Sun Jul 27, 2003 9:45 pm
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