Page 1 of 1

Need to fetch array of data from a function.

Posted: Fri Jul 10, 2009 1:54 am
by balajikannan19
please help me in solving the problem.
i have a class with many functions.I am calling a function with the object from another PHP file.
The class function is the select query from a table in Mysql.When i call the function it is returning the first data in the table.
I need the whole table to be displayed when i call the function.
Advance thank you.

Re: Need to fetch array of data from a function.

Posted: Fri Jul 10, 2009 1:58 am
by pcoder
I think, It would be better to return the resource instead of array.
And you can fetch the array result from the calling page with this resource.

Re: Need to fetch array of data from a function.

Posted: Fri Jul 10, 2009 2:02 am
by balajikannan19
Can you say this in detail.I am not getting you.Sorry