Added prepare() function for getData() queries