 <p>In your code $row is a an object (you've used mysql_fetch_object), and the .= operator tries to build a string, concatenating $liResult and $row. I believe this behaviour only works if your object implements a <a href="http://uk3.php.net/manual/en/language.oop5.magic.php#language.oop5.magic.tostring" rel="nofollow noreferrer">toString method</a></p> <p>You could return an array of rows using this code:</p> <pre><code>public function fetchObject($psClassname ="",$paParams =array()){ $lrResource = $this-&gt;mrQueryResource; $liResult = array(); while($row = mysql_fetch_object($lrResource,$psClassname,$paParams)){ $liResult[] = $row; } return $liResult; } </code></pre>