Almost have everything working with mysqli. Don't know hwy it fails sometimes but it does. No way of finding the correct data currently