-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
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) ) {
-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:
>
>
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
-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,
>
>
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 )
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
> >
>
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
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 )
function GetAr
9 matches
Mail list logo