PHP » GoLang |
login |
register |
about
|
GoLang mysqli_result::fetch_assoc
request it (439)
GoLang replacement for PHP's mysqli_result::fetch_assoc
[edit | history]
PHP mysqli_result::fetch_assocPHP original manual for mysqli_result::fetch_assoc [ show | php.net ]mysqli_result::fetch_assocmysqli_fetch_assoc(PHP 5, PHP 7) mysqli_result::fetch_assoc -- mysqli_fetch_assoc — Fetch a result row as an associative array DescriptionObject oriented style
array mysqli_result::fetch_assoc
( void
)
Procedural style
Returns an associative array that corresponds to the fetched row or
Parameters
Return Values
Returns an associative array of strings representing the fetched row in the result
set, where each key in the array represents the name of one of the result
set's columns or If two or more columns of the result have the same field names, the last column will take precedence. To access the other column(s) of the same name, you either need to access the result with numeric indices by using mysqli_fetch_row() or add alias names. ExamplesExample #1 Object oriented style
<?php Example #2 Procedural style
<?php The above examples will output: Pueblo (USA) Arvada (USA) Cape Coral (USA) Green Bay (USA) Santa Clara (USA) Example #3 A mysqli_result example comparing iterator usage
<?php The above example will output something similar to: 'root'@'192.168.1.1' 'root'@'127.0.0.1' 'dude'@'localhost' 'lebowski'@'localhost' ================== 'root'@'192.168.1.1' 'root'@'127.0.0.1' 'dude'@'localhost' 'lebowski'@'localhost' See Also
|
more
Recently updated
more
Most requested
more
Last requests
|