Please add the ability to specify multiple tables.
Sample:
this.get = function(tableName, responseCallback) {
if (typeof tableName.push === 'function') {
for (var i = 0; i < tableName.length; i++) {
if (typeof tableName[i] === 'string') {
tableName[i] = escapeFieldName(tableName[i]);
} else {
tableName.splice(i,1);
}
}
tableName = tableName.join(',');
}
if (typeof tableName === 'string') {
var combinedQueryString = 'SELECT ' + (selectClause.length === 0 ? '*' : selectClause.join(','))
+ ' FROM ' + tableName
+ buildJoinString()
+ buildDataString(whereClause, ' AND ', 'WHERE')
+ (orderByClause !== '' ? ' ORDER BY ' + orderByClause : '')
+ (limitClause !== -1 ? ' LIMIT ' + limitClause : '')
+ (offsetClause !== -1 ? ' OFFSET ' + offsetClause : '');
connection.query(combinedQueryString, responseCallback);
resetQuery(combinedQueryString);
}
return that;
};
Thanks!
Please add the ability to specify multiple tables.
Sample:
Thanks!