Posted by Captain Paralytic on 11/26/07 11:22
On 26 Nov, 09:29, pradeep <pwprad...@gmail.com> wrote:
> Dear all,
>
> I want to know the difference between mysql_fetch_array() and
> mysql_fetch_row().
>
> I know that mysql_fetch_row() return data in numeric array while
> mysql_fetch_array() return data in numeric as well as in associative
> array.
So you know the difference then
>
> But my question is, why it returns in both format. Is it wastage of
> memory ?
It returns in both formats because that is what it was built to do.
>Is it wastage of memory ?
It is only a waste if you don't need both array types. If you only
want numeric use mysql_fetch_row(), or you can use msql_fetch_array()
with the MSQL_NUM constant. If you only want associative then use
MSQL_ASSOC.
> Why this wastage is necesarry ?
>
> Thanks in advance.
>
> BYe.
[Back to original message]
|