Hey all,
Well I have tried to find a solution for the following all day long now, but don`t seem to get anywhere.
Following situation:
I have a function file, one function is responsible for getting data from a table. Simple you might say first, but the problem is, that if I want to get a whole bunch of rows, I will have a hard time generalizing that. Usually I call everything in a for loop directly in the code, but this time I want to have something like this:
1. The code calls the function with the SQL logic
2. The function executes the SQL command and saves one row per array
3. The function returns all arrays
4. The code takes care of further manipulation
Now here is the thing: Assume I call all rows from a table where gender == male. Of course that will be multiple. Somehow my function will have to save all this in an array row[1],row[2],row[3],...Now that not being enough, it will have to return all rows, so eg. return row;
Now the code has to go through all valid rows, for example
But I do not seem to figure out how to all this. Following shows where I currently stand:
Can someone help me with this?
Thanks a lot
Max