Modified the database query to eschew ON DUPLICATE KEY in favour of a tiered update or insert if it fails. To keep the auto_increment lower or something.
Merge branch 'master' of https://github.com/sparks/rter