note 10584 deleted from function.mysql-fetch-object by betz

From: Date: Sat, 10 Aug 2002 16:48:56 +0000
Subject: note 10584 deleted from function.mysql-fetch-object by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-34752@lists.php.net to get a copy of this message
When you use this function without specifing the result_type you get duplicate information. One is $row->username; the other is $row->0; or what-ever the column number username is. They give the same information. To avoid this you should always do mysql_fetch_object($result, MYSQL_ASSOC); or mysql_fetch_object($result, MYSQL_NUM);

« previous php.notes (#34752) next »