Allow single bound parameters not in arrays in DB.query() calls
This commit is contained in:
parent
45b9234996
commit
098b7b1b9e
|
@ -169,6 +169,11 @@ Scholar.DB = new function(){
|
|||
}
|
||||
|
||||
if (statement && params){
|
||||
// If single parameter, wrap in an array
|
||||
if (!params.length){
|
||||
params = [params];
|
||||
}
|
||||
|
||||
for (var i=0; i<params.length; i++){
|
||||
// Integer
|
||||
if (params[i]!==null && typeof params[i]['int'] != 'undefined'){
|
||||
|
|
Loading…
Reference in New Issue
Block a user