So i have this function that display information from a mysql table and it works perfectly when i call it. However i am having trouble understanding how to alter it so that