Bing Du wrote:
The following are Cold Fusion code.  It's interesting that previously
defined queries can be used as 'tables' to pull data from.
=======
<CFQUERY name="getprojects" datasource="#dbname#">
                        SELECT     db_entry_num, title
                        FROM       account_info
        </CFQUERY>

<CFQUERY name="getprojectID" datasource="#GSN#">
        SELECT projectID
        FROM ResearchProjects
        WHERE IDNo = #url.IDNo#
        </cfquery>

<cfif getprojectID.recordcount GT "0">
        <!--- Query of a query --->
                <cfquery dbtype="query" name="getstudproj">
                SELECT title, db_entry_num, projectID
                FROM getprojects, getprojectID
                WHERE        db_entry_num = projectID
                </cfquery>
        </cfif>
=========


> It's interesting that previously defined queries can be used as
> 'tables' to pull data from.  In MySQL, does
> the same functionality have to be implemented using join or subselect?

Not necessarily. I would think the CREATE .... SELECT statement would be the closest equivalent.

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

--J

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to