php - Looping through a recordset twice -


i'm developping moodle 2.9.1 pluggin , need loop through small recordset twice on same page.

i'm using

$rs = $db->get_recordset_sql($sql, array()); 

to data mysql.

i need function mysql data_seek(0) work on recordset again cannot find related in moodle api or forums.

if know data not going excessively huge, can use get_records_sql() instead. return array, indexed first field in select. can want array (loop through multiple times, split, pop, shift, etc).


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -