Dynamic tables in 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
someberry
Forum Contributor
Posts: 172
Joined: Mon Apr 11, 2005 5:16 am

Dynamic tables in Mysql

Post by someberry »

Hi all

I want to create a table in mysql but the content of it being information based on other tables in the database. I'm sure this is possible, but dont know how or what you call it to look up a tutorial.

Any one know what is called and point me to a web site on it?

So this table wouldn't be for editing it may contain couts, sums etc of other tables.

I know you just do all this php etc, just asking if this possible.

Thanks
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

its called temporary table...

Code: Select all

CREATE TEMPORARY TABLE `xxx` ( ... )
User avatar
Skittlewidth
Forum Contributor
Posts: 389
Joined: Wed Nov 06, 2002 9:18 am
Location: Kent, UK

Post by Skittlewidth »

http://dev.mysql.com/doc/refman/4.1/en/ ... table.html

That link is a bit of information overload but basically you'll probably want something like:

Code: Select all

CREATE TEMPORARY TABLE
    temp_tablename
SELECT
  ....
 FROM
   ....
   ....
 [i]and all your other select and join options [/i]
Paul Richards
Forum Newbie
Posts: 2
Joined: Thu Nov 24, 2005 11:16 am

simular problem

Post by Paul Richards »

Does any one know how to do a table that updates automatically as other tables change in the database?
Post Reply