09-27-2007, 11:42 PM
|
#1 (permalink)
|
|
The Frequenter
Join Date: Sep 2007
Posts: 360
Thanks: 24
|
fetch function
I have a fetch function in my database class which only echo's out one value (I reckon the last added value but that's not what I want to do. I want to fetch all the values in the array not only the last added value.
How can I achieve this with functions? :confused:
PHP Code:
/* * Summary: Fetches the result from the datbase in an array * Parameters: SQL Statement * Return: Returns an array of strings that corresponds to the fetched rows */ public function fetch($szSQL){ $szResult = mysql_query($szSQL); $aResult = mysql_fetch_array($szResult, MYSQL_ASSOC); return $aResult; }
|
|
|
|