db_fetch_row From Online Manual

Revision as of 11:50, 5 June 2011 by Emanuele (talk | contribs) (Created page with "{{smcfunc |function=db_fetch_row |usage=$smcFunc['db_fetch_row'] ($result) |description=return the exact same results as [http://php.net/mysql_fetch_row mysql_fetch_row]. Frequen...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Usage:

$smcFunc['db_fetch_row'] ($result)


Description: return the exact same results as mysql_fetch_row. Frequently used when is known the query returns only one row of data.

Parameters:

  • $result a query resource as returned for example by db_query

Return: an array of the values obtained from the query

Notes: emulated while using SQlite with smf_sqlite_fetch_row.

Example:

while ($row = $smcFunc['db_fetch_row']($request))
	$toDelete[] = $row[0];

Example using the function list:


list ($first_message, $last_message) = $smcFunc['db_fetch_row']($request);



Advertisement: