Last active
August 29, 2015 14:04
-
-
Save robertz/fcfda780077e63068078 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function get(string objectid = '') { | |
var queryUser = new query(); | |
var hasParams = len(arguments.objectid) && isNumeric(arguments.objectid); | |
var sql = 'select objectID, username, password, bAdmin, ratingLimit from user'; | |
if(hasParams){ | |
sql = sql & ' where objectid = :objectid'; | |
} | |
queryUser.setSQL(sql); | |
if(hasParams){ | |
queryUser.addParam(name="objectid",value="1",cfsqltype="INT"); | |
} | |
return application.utils.queryToArray( queryUser.execute().getResult() ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment