function MySQLTimeStampCompatibleString(timestamp){
return new Date(timestamp).toISOString().substring(0, 19).replace('T', ' ');
}
function queryWithTimestampLongValues(fromTime, toTime) {
var query = "";
if(fromTime && toTime){
query += 'SELECT * FROM user_info WHERE
user_info.created_at > TIMESTAMP("' +
MySQLTimeStampCompatibleString(fromTime) + '") AND
user_info.created_at < TIMESTAMP("' +
MySQLTimeStampCompatibleString(toTime) + '")';
}
return query;
}
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)