Db num rows: Difference between revisions From Online Manual

Jump to: navigation, search
(Created page with "{{smcfunc |function=db_num_rows |usage=$smcFunc['db_num_rows'] (result) |description=Used to obtain the number of rows of a query. It works exactly like [http://php.net/mysql_num...")
 
m (refresh SMW properties)
 
(One intermediate revision by one other user not shown)
Line 10: Line 10:
fatal_lang_error('admin_file_not_found', true, array($_REQUEST['filename']));</nowiki>
fatal_lang_error('admin_file_not_found', true, array($_REQUEST['filename']));</nowiki>
}}
}}
<noinclude>
<noinclude>
[[Category:Database Functions]]
[[Category:Database Functions]]</noinclude>
[[Category:2.0]]
[[Category:Customizing SMF]]
[[Category:Developing SMF]]</noinclude>

Latest revision as of 16:41, 11 October 2012

Usage:

$smcFunc['db_num_rows'] (result)


Description: Used to obtain the number of rows of a query. It works exactly like mysql_num_rows.

Parameters:

  • result a query resource.

Return: an integer representing the number of rows in the result set or false on failure.

Example:

if ($smcFunc['db_num_rows']($request) == 0)
	fatal_lang_error('admin_file_not_found', true, array($_REQUEST['filename']));



Advertisement: