Fix mysql select, not sure where I was going