No edit summary |
m (refresh SMW properties) |
||
(5 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{smcfunc | {{smcfunc | ||
|function=db_fetch_assoc | |function=db_fetch_assoc | ||
|usage= | |order_position=2 | ||
|usage=$smcFunc['db_fetch_assoc'] ($result) | |||
|description=Will return exact same results as [http://php.net/mysql_fetch_assoc mysql_fetch_assoc] | |description=Will return exact same results as [http://php.net/mysql_fetch_assoc mysql_fetch_assoc] | ||
|parameters={{parmdesc | |parameters={{parmdesc | ||
Line 7: | Line 8: | ||
}} | }} | ||
|return=an associative array with a single row of results from the query. | |return=an associative array with a single row of results from the query. | ||
|example=< | |example=<nowiki> while ($row = $smcFunc['db_fetch_assoc']($request)) | ||
$search_params['brd'][] = $row['id_board']; | $search_params['brd'][] = $row['id_board'];</nowiki> | ||
}} | }} | ||
<noinclude>[[Category:Database Functions]]</noinclude> | |||
<noinclude> | |||
[[Category: |
Latest revision as of 16:39, 11 October 2012
Usage:
$smcFunc['db_fetch_assoc'] ($result)
Description: Will return exact same results as mysql_fetch_assoc
Parameters:
- $result a resource returned from a query.
Return: an associative array with a single row of results from the query.
Example:
while ($row = $smcFunc['db_fetch_assoc']($request)) $search_params['brd'][] = $row['id_board'];