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