I was able to move the data from the header to Recordset1 while statement:
<?php
while(!$Recordset1->atEnd()) {
?>
<h2><?php echo($Recordset1->getColumnVal("state")); ?></h2>
<?php
$Recordset2 = new WA_MySQLi_RS("Recordset2",$mitoWebsiteMSQLI,10);
$Recordset2->setQuery("SELECT * FROM completedProjects ORDER BY project_name ASC");
$Recordset2->execute();
?>
<?php
while(!$Recordset2->atEnd()) {
echo($Recordset2->getColumnVal("project_name")); ?><br>
<?php
$Recordset2->moveNext();
}
$Recordset2->moveFirst(); //return RS to first record
//end of projects inner loop?>
<?php
$Recordset1->moveNext();
}
$Recordset1->moveFirst(); //return RS to first record
?>
it has created the repeated date for recordset2. But I continue to have the same issue. It will repeat the project data, but not linked to each state. How can I join the data from recordset1 to recordset 2?