|
Posted by frizzle on 04/25/06 22:55
Gerard Matthew wrote:
> Frizzle,
>
> mysql_fetch_array() by default returns both result types. MYSQL_ASSOC
> and MYSQL_NUM
>
> Therefore mysql_fetch_array($result, MYSQL_BOTH) is the same as
> mysql_fetch_array($result) based on the return values.
>
> For numeric indicies you use MYSQL_NUM...
> mysql_fetch_array($result,MYSQL_NUM);
> and for associative indicies you would use MYSQL_ASSOC...
> mysql_fetch_array($result,MYSQL_ASSOC).
>
> Hope this helps out in understanding.
>
> Rgds,
> Gerard.
Yes it does. Thanks!
@David:
table: FOO
id login Name Address1
1 fred Fred Flinstone 123 Anywhere
2 barney Barney Rubble 125 Anywhere
array:
result[1][login] = fred
result[2][name] = Barney Rubble
Something like that. But only if 'id' is a returned field,
else use default array indices.
(and how could i define the array's name as another
function var ? )
Anyways, both you guys helped me a lot already!
Frizzle.
Navigation:
[Reply to this message]
|