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
Post a Comment