Switched all SQL queries over to using prepared statements, that way i
don't have to worry about incorrect number of ticks, etc...