Added addData function to getDataC

Added function to get data and add it to list as previous method would
re-execute previous MySQL query if loop was passed.