|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-08-27 01:26 UTC] georg@php.net
[2002-08-27 01:30 UTC] georg@php.net
[2003-02-21 08:25 UTC] jg at proz dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 09:00:01 2025 UTC |
Note: This fails in 4.2.1 and 4.2.2 mysql_connect($host, $user, $pass) or die("could not connect"); mysql_select_db($database); $result = mysql_query("SELECT * FROM $table"); while ($row = mysql_fetch_array($result)) { printf ("Name: " . $row[1] . "--" . $row["first"] . "--" . "<br>" ); } mysql_free_result($result); Data is placed in the numeric indices, but NOT the associative ones. This fails on dedicated web hosting (JTL net) as well as my on version running on XP. $row[1] gets data, but $row["first"] does not. Also does not work if add the MYSQL_ASSOC parameter nor does the mysql_fetch_assoc() work.