note 103487 added to function.mysql-fetch-array
| From: | luke at lmbd dot co dot uk | Date: | Fri, 15 Apr 2011 16:02:42 +0000 |
| Subject: | note 103487 added to function.mysql-fetch-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-178883@lists.php.net to get a copy of this message | ||
That does actually return what you'd expect when using MYSQL_BOTH, because you get two sets of
results within the array, which are returned when looped through; You get the associative values,
which are field named paired with a value, and then you get the index position and it's
associated value (minus the field name).
Generally speaking you'd only want to have to use fetch_assoc anyway, since you are more likely
to want to reference the information by field name, unless you are absolutely certain of the order
in which the fields will be returned to you from the database.
----
Server IP: 69.147.83.197
Probable Submitter: 82.71.62.59
----
Manual Page -- http://www.php.net/manual/en/function.mysql-fetch-array.php
Edit -- https://master.php.net/note/edit/103487
Del: integrated -- https://master.php.net/note/delete/103487/integrated
Del: useless -- https://master.php.net/note/delete/103487/useless
Del: bad code -- https://master.php.net/note/delete/103487/bad+code
Del: spam -- https://master.php.net/note/delete/103487/spam
Del: non-english -- https://master.php.net/note/delete/103487/non-english
Del: in docs -- https://master.php.net/note/delete/103487/in+docs
Del: other reasons-- https://master.php.net/note/delete/103487
Reject -- https://master.php.net/note/reject/103487
Search -- https://master.php.net/manage/user-notes.php