Friday 16-05-2008
About Us | Contact Us | FAQ | Support | Links
Coldfusion Custom Tags, CFXs, CFCs, Full Applications and more!
< Built by ColdFusion Developers, for ColdFusion Developers >
Home | Tag Categories | Latest Tags | Top Rated Tags | Top Selling Tags | My Account | Search | Sell Your Tags | Tags A-Z
Random Query

Random Query - cf_randomquery is a quick solution to give a random recordset. This custom tag supports any kind of query (recordset) as the datasource, not limited to specific database.
Developer Name: Rizal Firmansyah
Company Name: MasRizal & Partners
Email Developer Email Developer:
Date Created: Tuesday 04/05/2004
Latest Version: 1.0
Price: $25
License: One copy per developer.
Encrypted: No
Average Rating:
Times Rated: 7
Rate This Tag:


Tag Comments

There are no comments for this tag yet!
 Related ColdFusion Applications
Developers who purchased Random Query also purchased:
  1. SlideBarMenu - Outlook like navigation and much more
  2. CFX_stampImage
  3. CF_FileManager V3.2 (Cross Browser)
  4. CF_WebBoard V2.1 (Cross Browser/Un-Encrypted)
  5. Reservation Calendar
  6. TrimVars - Prevent XSS Flaws
  7. CF_easyFrame
  8. CF_TreeControl
  9. DHTML Outlook Sidebar Navigation V2
  10. CFX_JZip


What Is Random Query?
cf_randomquery is a quick solution to give a random recordset.
This custom tag supports any kind of query (recordset) as the datasource, not limited to specific database.

This custom tag was written to help developers create a random recordset easily,
and without the need to know or change their SQL code.

This custom tag comes with a very low price.
I believe the price of this custom tag is less than an average 1 hour programmers rate.
But by using this custom tag, you save lots of your valuable time writing SQL code to produce the same result.
And because of its very low price (esp. comparing your rate to create such a function in SQL),
i would like to give a license to use this tag is for "1 copy per developer".
That means each developer must purchase a copy of this custom tag for his/her own use.

*** DISCOUNT FOR CFTAGSTORE CUSTOMERS ***
Use promotion code: CFTAGSTORE to get 40% discount

cf_randomquery is a quick solution to give a random recordset.
This custom tag supports any kind of query (recordset) as the datasource, not limited to specific database.

Requirements: ColdFusion 5, MX and up

Usage:
<cf_randomquery DataSource="query/recordset source - mandatory" Name="The name query. The query name is used later in the page to reference the query's record set - mandatory" MaxRows="Specifies the maximum number of rows to return in the record set - optional (default all rows)">

Examples:
1. Randomize recordset from database query.
<!--- query database for information --->
<cfquery name = "GetParks" dataSource = "cfsnippets">
SELECT   PARKNAME, REGION, STATE
FROM     Parks
</cfquery>
<cf_randomquery DataSource="GetParks" Name="RandomParks"> <!--- RandomParks will contain all rows from GetParks in random order --->
<cf_randomquery DataSource="GetParks" Name="RandomPark" MaxRows="1"> <!--- RandomPark will contain 1 random row from GetParks --->

2. Randomize recordset from programmatically created query
<cfset myQuery = QueryNew("name, address, phone")>
<cfset newRow  = QueryAddRow(MyQuery, 2)>
<cfset temp = QuerySetCell(myQuery, "name", "Fred", 1)>
<cfset temp = QuerySetCell(myQuery, "address", "9 Any Lane", 1)>
<cfset temp = QuerySetCell(myQuery, "phone", "555-1212", 1)>
<cfset temp = QuerySetCell(myQuery, "name", "Jane", 2)>
<cfset temp = QuerySetCell(myQuery, "address", "14 My Street", 2)>
<cfset temp = QuerySetCell(myQuery, "phone", "588-1444", 2)>
<cf_randomquery DataSource="myQuery" Name="RandomMyQuery"> <!--- RandomMyQuery will contain all rows from myQuery in random order --->
<cf_randomquery DataSource="myQuery" Name="RandomMyQuery1" MaxRows="1"> <!--- RandomMyQuery1 will contain 1 random row from myQuery --->

Important Note:
This custom tag adds one column name "cf_randomquery" to the resulting recordset.
You may want to remove this column if your application manipulate data from query directly without specifying column name.
So, please keep in mind that you are recommended to specify column names to manipulate data from resulting random query.

Click here for demonstration http://www.masrizal.com/index.cfm?fuseaction=idea.download_detail&ProductID=cf_randomquery

*** DISCOUNT FOR CFTAGSTORE CUSTOMERS ***
Use promotion code: CFTAGSTORE to get 40% discount




 


< Business Strength Coldfusion Custom Tags >
Sitemap | Privacy | Branding | Web Services | Support | Contact Us
PageCLixUid