DB Associative Arrays

From: Date: Tue, 29 Jun 2004 07:21:54 +0000
Subject: DB Associative Arrays
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-13395@lists.php.net to get a copy of this message
I'm using the following parameters in a DB query: $this->result = $this->db->getAssoc($query,
        false, array(), DB_FETCHMODE_ASSOC);
This makes a beautiful assoc array, but it uses my first database field as the index, so my user_id in this case becomes the index and I can't use the index anywhere else because its not a field anymore but an index. Is there a way around this? Here's my array printed out with the missing user_id (it has become the index). Array ( [1] => Array ( [name] => Paul De La Cruz [email] => email@address.net [main_phone] => 407-351-2972 [program] => Master of Eletrical and Computer Engineering [created_date] => 2004-06-20 00:00:00 [student_type] => Online Education [student_type_id] => 1 ) ) Don

« previous php.pear.general (#13395) next »