Re: Mysql fetch_row()

From: Date: Sun, 20 Jun 2004 17:37:01 +0000
Subject: Re: Mysql fetch_row()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-188699@lists.php.net to get a copy of this message
On Sun, 20 Jun 2004 19:05:31 +0200, Gerben <gerbendekeijzer@12move.nl> wrote: > > when I call mysql_fetch_row() I get an array, but this Array doesn't have > the fieldnames as array-keys. > I've seen several codes from others where they use something like > > print $row['key']; 'key' simply needs to be the primary key's field name you made when you made the table or whatever. If you named you primary key 'key' then your good, else use what it's really named. You can use PHP's key() function with an associative array but I find I rarely need it as I usually already know the field names and the primary keys of all my tables. -- Greg Donald http://destiney.com/

« previous php.general (#188699) next »