Question One: What purpose do the duplicate records serve?
Per this code, the follow_unique column is another factor:
$req = "SELECT follow_topic_id FROM {$tbl} WHERE follow_topic_id = '{$tid}' AND follow_user_id = '{$uid}' LIMIT 1";
$fol = jrCore_db_query($req, 'SINGLE');
// toggle
if (!$fol) {
[b]$unq = substr(md5(microtime()), 0, 16);[/b]
$req = "INSERT INTO {$tbl} (follow_topic_id,follow_user_id,follow_created,follow_unique) VALUES ('{$tid}','{$uid}',UNIX_TIMESTAMP(),'{$unq}') ON DUPLICATE KEY UPDATE follow_created = UNIX_TIMESTAMP()";
$tag = $_ln['jrDiscussion'][43];
$fol = 'on';
}
Question Two: What function does follow_unique serve - especially given follow_created?
Again, I just want to ensure I understand this mechanism because my logic relies upon it to a degree.
--
TiG
updated by @tig: 02/22/18 06:24:01PM