php-db | 2001072

[PHP-DB] Temporary Tables in MySQL From: Alnisa Allgood (allgood2 <email protected>)
Date: 07/22/01

Hi All:

I have a problem. I trying to create a temporary table from the query
results of the following statement.

$results=mysql_query ("SELECT CONCAT(membername, \" \", mission, \"
\", brief, \" \", city, \" \", state, \" \", programs) AS searchable,
memberid FROM members") or die("DIE! DIE! DIE!");

The query seems to work fine by itself using phpmyadmin, returns a
results table with two columns memberid, and searchable (note the \
must be removed if typed directly into phpmyadmin)

I want to use these results to create a new temporary table with two
columns memberid and searchable. But the book I'm referencing states
that you can create a table from SELECT results in one step is either
lying, or I'm doing something very wrong, because when I format the
statement like:

CREATE TABLE ezsearch SELECT CONCAT(membername, \" \", mission, \"
\", brief, \" \", city, \" \", state, \" \", programs) AS searchable,
memberid FROM members

I get massive errors.

I'm reading MySQL from New Riders, but I can't seem to figure this
out based on the information they've provided.

Alnisa

-- 
   .........................................
    Alnisa  Allgood
    Executive Director
    Nonprofit Tech
    (ph) 415.337.7412  (fx) 415.337.7927
    (url)  http://www.nonprofit-techworld.org
    (url)  http://www.nonprofit-tech.org
    (url)  http://www.tech-library.org
   .........................................
    Nonprofit Tech E-Update
    mailto:nonprofit-tech-subscribe <email protected>
   .........................................
    applying technology to transform
   .........................................

-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>