Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * arrayToQuery
- * Allows us to convert an array into a single column query.
- * @author Ryan Mueller @CreativeNotice
- * @created 10/27/2011
- * @param {Array} arr Array to be converted {required}
- * @param {String} colname Name for query column {required} default=col1
- */
- public Query function arrayToQuery(required array arr,required string colname='col1'){
- var qry = queryNew(arguments.colname);
- for(i=1;i <= ArrayLen(arguments.arr);i=(i+1)){
- queryAddRow(qry);
- querySetCell(qry,arguments.colname,arr[i]);
- }
- return qry;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement