And three years later I have the same problem, was about to go insane, new to php, but have worked with mySQL for 5 years.

Can't thank you guys enough, honest!