note 30657 added to function.mysql-fetch-array

From: Date: Tue, 25 Mar 2003 04:28:45 +0000
Subject: note 30657 added to function.mysql-fetch-array
Groups: php.notes 
Request: Send a blank email to php-notes+get-45780@lists.php.net to get a copy of this message
if you have to use the field name with number like 1,2,..etc, it cause a problem when you fetch it with mysql_fetch_array. An index array will contain a field name. The solusion is: 1. Use mysql_fetch_assoc to escape the result to html; 2. Use alias and choose another name of field in mysql_query -- http://www.php.net/manual/en/function.mysql-fetch-array.php http://master.php.net/manage/user-notes.php?action=edit+30657 http://master.php.net/manage/user-notes.php?action=delete+30657 http://master.php.net/manage/user-notes.php?action=reject+30657

« previous php.notes (#45780) next »