adding code to insert ticks to mysql