Temporary Tables in MySQL
| From: | Alnisa Allgood | Date: | Mon, 23 Jul 2001 01:27:56 +0000 |
| Subject: | Temporary Tables in MySQL | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-10650@lists.php.net to get a copy of this message | ||
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@egroups.com
.........................................
applying technology to transform
.........................................