For Programmers: Free Programming Magazines  


Home > Archive > PHP Programming > October 2004 > Build MySQL table with a query









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Build MySQL table with a query
Jeremy Ross

2004-10-28, 8:56 am

Hello,

I am looking for a function that will build a mysql table with the
results of a query.

If you could help that would be great,
Thanks,
Jeremy Ross
Brommer

2004-10-28, 8:56 am

Jeremy Ross wrote:
> Hello,
>
> I am looking for a function that will build a mysql table with the
> results of a query.


Not sure if this is what you need, but you can do it directly in SQL:

CREATE TABLE newtable AS
SELECT * FROM oldtable;
Jeremy Ross

2004-10-28, 8:56 am

Thank you that was just what I needed.

Brommer wrote:

> Jeremy Ross wrote:
>
>
>
> Not sure if this is what you need, but you can do it directly in SQL:
>
> CREATE TABLE newtable AS
> SELECT * FROM oldtable;

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com