PHP » GoLang |
login |
register |
about
|
GoLang maxdb_fetch_array
request it (407)
GoLang replacement for PHP's maxdb_fetch_array
[edit | history]
maxdb_fetch_arraymaxdb_result::fetch_array(PECL maxdb >= 1.0) maxdb_fetch_array -- maxdb_result::fetch_array — Fetch a result row as an associative, a numeric array, or both DescriptionProcedural style Object oriented style
Returns an array that corresponds to the fetched row or maxdb_fetch_array() is an extended version of the maxdb_fetch_row() function. In addition to storing the data in the numeric indices of the result array, the maxdb_fetch_array() function can also store the data in associative indices, using the field names of the result set as keys.
If two or more columns of the result have the same field names, the last column will take precedence and overwrite the earlier data. In order to access multiple columns with the same name, the numerically indexed version of the row must be used.
The optional second argument By using the MAXDB_ASSOC constant this function will behave identically to the maxdb_fetch_assoc(), while MAXDB_NUM will behave identically to the maxdb_fetch_row() function. The final option MAXDB_BOTH will create a single array with the attributes of both. By using the MAXDB_ASSOC_UPPER constant, the behaviour of this function is identical to the use of MAXDB_ASSOC except the array index of a column is the fieldname in upper case. By using the MAXDB_ASSOC_LOWER constant, the behaviour of this function is identical to the use of MAXDB_ASSOC except the array index of a column is the fieldname in lower case. Return Values
Returns an array that corresponds to the fetched row or ExamplesExample #1 Object oriented style
<?php Example #2 Procedural style
<?php The above example will output something similar to: New York (NY) New York (NY) Long Island (NY) See Also
|
more
Recently updated
more
Most requested
more
Last requests
|