|
ColdFusion Home
Basic ColdFusionIntroductionColdFusion Installation ColdFusion Editors ColdFusion Syntax ColdFusion Includes ColdFusion Variables ColdFusion Variable Types ColdFusion If Statements ColdFusion Loops ColdFusion Datasource ColdFusion Database Queries ColdFusion Lists ColdFusion Arrays ColdFusion Redirect ColdFusion Debugging ColdFusion Error Handling Advanced ColdFusionColdFusion MailColdFusion Functions ColdFusion Components ColdFusion Web Services ColdFusion Upload File ColdFusion Read File ColdFusion Write File ColdFusion Append File ColdFusion Rename File ColdFusion Copy File ColdFusion Move File ColdFusion Delete File Cffile Parameters Using cffile Parameters ColdFusion FTP (cfftp) cfftp Cached Connections ColdFusion HTTP (cfhttp) ColdFusion Query of Queries ColdFusion Charts ColdFusion Summary ColdFusion AdminCF AdministratorCF Archive and Deploy CF Scheduled Tasks CF Mini Tutorial ColdFusion BooksColdFusion MX BibleMacromedia ColdFusion MX 7 Web Application Construction Kit FREE Hosting!With every domain name you register with ZappyHost, you get FREE hosting.$1.99 Domain NamesWith every new non-domain purchase thru ZappyHost, you get a domain name for only $1.99. |
ColdFusion Query of Queries (QoQ)ColdFusion Query of Queries (QoQ) let you query the results of an existing database query. You can also query a non-database query object, for example, the results of a cfftp directory listing. SyntaxTo create a Query of Queries, you use the cfquery tag (just like with a database query), and specify
Query an Existing Database QueryIn this example, we peform a query against a database, retrieving all records from the Individual table. After outputting the results, we then create a Query of Queries, which queries the resultset of the first query. We also output the results of this query.
Depending on the contents of the database and the FTP site, the above code could result in something like this:
Results of initial query
Fred Flinstone Homer Simpson Homer Brown Ozzy Ozzbourne Homer Gain Results of QoQ Homer Simpson Homer Brown Homer Gain Query a Non-Database Query ObjectOne of the great things about QoQ is that you can query a non-database query object. An example of a non-database query object is the results of a cfftp directory listing. This is where you use the cfftp tag to list the contents of a directory on a remote server. The following example uses the cfftp tag to list the contents of a remote server. It then uses a QoQ to filter out only those files which are greater than 1024 bytes in length.
Depending on the contents of the directory, the results might look something like this:
Initial query object
ftp://localhost/AboutUs.html (98345 bytes) ftp://localhost/images (0 bytes) ftp://localhost/index.html (4 bytes) ftp://localhost/ReadmeNow.htm (6500 bytes) Results of QoQ ftp://localhost/AboutUs.html (98345 bytes) ftp://localhost/ReadmeNow.htm (6500 bytes) Enjoy this website?
Oh, and thank you for supporting Quackit! |
Need Content for your Website?Get unique, quality digital content for your website. You can even earn money by reselling it!Includes:
|