Reply to Re: mySQL result to real array in function

Your name:

Reply:


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.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация