On 25-Jun-2003 Thomas Hochstetter wrote: > Hi guys, > > I wrote a generic getsql() function for my project's class. However, I > only manage to retrieve a single row. What it should really do is: > Read all rows into the array (with multiple results). > The code is below: > > function getsql($sql,$conn,$dbase,&$arr) > { > if($conn) > { > mysql_select_db($dbase,$conn); > $result = mysql_query($sql,$conn); > > while ($arr = mysql_fetch_assoc($result)) > { > return $arr; > // Something has to happen here!!!
Nothing will happen here!!! You've already returned from the function. > } <snipage> Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php