RE: [PHP] mysql_fetch_array to associative array

2007-07-16 Thread Andras Kende
-Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Monday, July 16, 2007 6:12 PM To: Andras Kende Cc: php-general@lists.php.net Subject: RE: [PHP] mysql_fetch_array to associative array On Mon, 2007-07-16 at 13:37 -0700, Andras Kende wrote

RE: [PHP] mysql_fetch_array to associative array

2007-07-16 Thread Robert Cummings
On Mon, 2007-07-16 at 13:37 -0700, Andras Kende wrote: > > > function GetAssoc($query) { > > $get = $this->Execute ( $query ); > > > $result = array(); > > while ( $row = mysql_fetch_array($get) ) {

RE: [PHP] mysql_fetch_array to associative array

2007-07-16 Thread Andras Kende
-Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Monday, July 16, 2007 1:46 PM To: Andras Kende Cc: php-general@lists.php.net Subject: RE: [PHP] mysql_fetch_array to associative array On Mon, 2007-07-16 at 13:37 -0700, Andras Kende wrote: > >

RE: [PHP] mysql_fetch_array to associative array

2007-07-16 Thread Robert Cummings
On Mon, 2007-07-16 at 13:37 -0700, Andras Kende wrote: > > Hi Rob, > > Thanks for your help, its associative but I forget to mention its needs > To be a single dimensional associative array. > > > $result = array(); > while ( $row = mysql_fetch_assoc($get) ) { > $result[] = $row; > } > > This

RE: [PHP] mysql_fetch_array to associative array

2007-07-16 Thread Andras Kende
-Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Monday, July 16, 2007 7:52 AM To: Andras Kende Cc: php-general@lists.php.net Subject: Re: [PHP] mysql_fetch_array to associative array On Mon, 2007-07-16 at 07:41 -0700, Andras Kende wrote: > Hello, > >

Re: [PHP] mysql_fetch_array to associative array

2007-07-16 Thread Jim Lucas
Andras Kende wrote: Hello, I use the following GetArray for returning an array from mysql results. But having a hard time modifying it for returning a simple associative array Like: $conn->GetAssoc('SELECT id, name from manufacturers') Array ( [2] => BMW [1] => MAZDA [9] => FORD )

Re: [PHP] mysql_fetch_array to associative array

2007-07-16 Thread Robert Cummings
On Mon, 2007-07-16 at 10:52 -0400, Robert Cummings wrote: > On Mon, 2007-07-16 at 07:41 -0700, Andras Kende wrote: > > Hello, > > > > I use the following GetArray for returning an array from mysql results. > > > > But having a hard time modifying it for returning a simple associative array > > >

Re: [PHP] mysql_fetch_array to associative array

2007-07-16 Thread Robert Cummings
On Mon, 2007-07-16 at 07:41 -0700, Andras Kende wrote: > Hello, > > I use the following GetArray for returning an array from mysql results. > > But having a hard time modifying it for returning a simple associative array > > Like: > > $conn->GetAssoc('SELECT id, name from manufacturers') > > A