Changeset 408 for GearsORM/trunk

Show
Ignore:
Timestamp:
03/21/08 21:44:41 (10 months ago)
Author:
uriel
Message:

prevent adding undefineds to the database

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • GearsORM/trunk/GearsORM.js

    r337 r408  
    5656                try 
    5757                { 
     58                        if(params) 
     59              for(var i=0;i<params.length;i++) 
     60                if(typeof(params[i]) == 'undefined') params[i] = null; 
     61                                 
    5862                        if(GearsORM.debug)GearsORM.log(sql,params); 
    5963                        return GearsORM.getDB().execute(sql,params || []); 
     
    7781                try 
    7882                { 
    79                         if(GearsORM.debug)GearsORM.log(sql,params); 
    80                         var rs = GearsORM.getDB().execute(sql,params || []); 
     83                        var rs = GearsORM.execute(sql,params); 
    8184                        rs.close(); 
    8285                        return rs;