cast to integer or use fetchresultset?