lib/query/insert.js
function GetValues(mydata, keys, index)
{
	//Output
	var values = [];
	
	//Loop
	for(var j = 0; j < keys.length; j++)
	{
		//Save data value
		var value = mydata[keys[j]];
		
		//Check if value exists
		if(!value)
		{
			//Show warning
			console.log('WARNING: value "' + keys[j] + '" is not defined on element "' + index + '" of your array.');
			
			//Set it to empty string
			value = '';
		}
		
		//Check the data type
		if(typeof value === 'string' || value instanceof String)
		{
			//Add the quotes
			value = '"' + value + '"';
		}
		
		//Push
		values.push(value);
	}
	
	//Return
	return values.join(',');
}
function GetValues(mydata, keys, index)
{
	//Output
	var values = [];
	
	//Loop
	for(var j = 0; j < keys.length; j++)
	{
		//Save data value
		var value = mydata[keys[j]];
		
		//Check if value exists
		if(!value)
		{
			//Show warning
			console.log('WARNING: value "' + keys[j] + '" is not defined on element "' + index + '" of your array.');
			
			//Set it to empty string
			value = '';
		}
		
		//Check the data type
		if(typeof value === 'string' || value instanceof String)
		{
			//Add the quotes
			value = '"' + value + '"';
		}
		
		//Push
		values.push(value);
	}
	
	//Return
	return values.join(',');
}
function GetValues ( mydata , keys , index ) { //Output
 var values = [ ] ; //Loop
 for ( var j = 0 ; j < keys . length ; j ++ ) { //Save data value
 var value = mydata [ keys [ j ] ] ; //Check if value exists
 if ( ! value ) { //Show warning
 console . log ( 'WARNING: value "' + keys [ j ] + '" is not defined on element "' + index + '" of your array.' ) ; //Set it to empty string
 value = '' ; } //Check the data type
 if ( typeof value === 'string' || value instanceof String ) { //Add the quotes
 value = '"' + value + '"' ; } //Push
 values . push ( value ) ; } //Return
 return values . join ( ',' ) ; }
Get all the values
Get all the values