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 -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -