Find Jobs
Hire Freelancers

ColdFusion MX Order Query by Category Tree

$30-100 USD

Completed
Posted over 17 years ago

$30-100 USD

Paid on delivery
- Often I get a query from the database that is in the form of a tree (each record has an ID and a parent ID). - I need a script that will order such a query by the parent ID recursively and return the reordered query - The script should also add a NestLevel column to the new query with a 1 for top level records, a 2 for their children, a 3 for their childrens children and so on. - The script must work with any query/column names - The script must be efficient (not going through the recordset too many times). Sample query: PageID ParentID PageTitle 1 0 Home 2 0 About Us 3 0 Products 4 0 Contact Us 5 2 History 6 3 Product 1 7 3 Product 2 8 5 Recent history Should return: PageID ParentID PageTitle Nest Level 1 0 Home 1 2 0 About Us 1 5 2 History 2 8 5 Recent history 3 3 0 Products 1 6 3 Product 1 2 7 3 Product 2 2 4 0 Contact Us 1 Sample Call: Solution Requirements: Create a method called orderQueryAsCategoryTree() Arguments: - Query - type="query" hint="I am the query to re-order" - IDProperty = type="string" hint="I am the name of the ID property within the query. E.g. UserID" - ParentProperty - type="string" hint="I am the name of the property containing the parent ID within the query. E.g. UserParentID." Returns: - a reordered query (type="query") ## Deliverables 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. Additional Requirements: - No use of UDFs, custom tags, other methods and no dependencies on anything other than core CF 7.02 features. If you find a UDF that helps on [login to view URL] or elsewhere, just take the underlying code and include it in the method (with well named variables - some of those tags have meaningless variable names). - Can be written using tag or cfscript syntax - ALL variables must be local scoped to make the method thread safe. To save having to var everything, please just add the following script as the first line after the arguments: Then preface al variables with Local. So, if you have a rowcount, call it Local.RowCount. - Please use camel case naming for all variables (e.g. RowCount - capitalized first letter for each word - no underscores or special characters). ## Platform ColdFusion 7.02 Professional Windows 2003 Server (Web edition)
Project ID: 3781169

About the project

2 proposals
Remote project
Active 18 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$106.25 USD in 5 days
5.0 (3 reviews)
3.2
3.2
2 freelancers are bidding on average $159 USD for this job
User Avatar
See private message.
$212.50 USD in 5 days
5.0 (27 reviews)
5.3
5.3

About the client

Flag of UNITED STATES
United States
5.0
79
Member since Oct 14, 2003

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.