Db data seek: Difference between revisions From Online Manual

Jump to: navigation, search
No edit summary
m (the the -> to the)
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
|function=db_data_seek
|function=db_data_seek
|usage=$smcFunc['db_data_seek'] (result, row_number)
|usage=$smcFunc['db_data_seek'] (result, row_number)
|description=Works exactly like [http://php.net/mysql_data_seek mysql_data_seek], it moves the internal row pointer for ''result'' the the row specified in ''row_number''. Emulated while using PostgreSQL with smf_db_data_seek.
|description=Works exactly like [http://php.net/mysql_data_seek mysql_data_seek], it moves the internal row pointer for ''result'' to the row specified in ''row_number''. Emulated while using PostgreSQL with smf_db_data_seek.
|parameters={{parmdesc
|parameters={{parmdesc
   |result|d1=a query resource obtained with [[db_query]].
   |result|d1=a query resource obtained with [[db_query]].
Line 12: Line 12:
return @$smcFunc['db_data_seek']($messages_request, 0);</nowiki>
return @$smcFunc['db_data_seek']($messages_request, 0);</nowiki>
}}
}}
<noinclude>
<noinclude>
[[Category:Database Functions]]</noinclude>
[[Category:Database Functions]]</noinclude>

Latest revision as of 14:57, 12 October 2012

Usage:

$smcFunc['db_data_seek'] (result, row_number)


Description: Works exactly like mysql_data_seek, it moves the internal row pointer for result to the row specified in row_number. Emulated while using PostgreSQL with smf_db_data_seek.

Parameters:

  • result a query resource obtained with db_query.
  • row_number is the row number you wish the pointer to be at.

Return: true on success, false on failure.

Example:

// Start from the beginning...
if ($reset)
	return @$smcFunc['db_data_seek']($messages_request, 0);



Advertisement: