Understanding "expects parameter 1 to be resource" in PHP MySQL Queries | CodeTrail