Get all rows inserted

Hello everyone

I am failing to get all records(Rows) from my “learners” table to be inserted into the “attendance” table. Please help!

$db->where("Project_ID", $modeldata['Project_ID']);
$value = $db->getValue("learners", "Learner_ID");

$table_data = array(
    "Learner_ID" => $value,
    "Project_ID" => $modeldata['Project_ID'],
    "Class_ID" => $rec_id

$db->insert("attendance", $table_data);

I can only get the first row

@Goto is this a phprad classic 2.7.3 project?

Yes it is phprad classic 2.7.3 project

Please recreate the post on the phprad forum here RadSystems Forum - Index, thank.