MYSQLI_ASSOC in MySQLi recordset?
Any tips on getting all results from a mysqli recordset and then appending that an existing array?
For instance I have a member id array with one value already in-place
$mid = 11;
$mids=[$mid];
print_r($mids);
Array ( [0] => 11 )
Then a recordset that polls other candidates and in this case finds two
$Recordset1 = new WA_MySQLi_RS("Recordset1",$rtk_i,1);
$Recordset1->setQuery("SELECT tblmember.mid FROM tblmember WHERE tblmember.cmhi_member = 1");
$Recordset1->execute();
array_push($mids,$Recordset1->getColumnVal("mid"));
But the results only show 2 rather than the total of 3 because the array_push function is not looping all the results
Array
(
[0] => 11
[1] => 10
)
Do we need to use MYSQLI_ASSOC in the recordset to create an array and then use that result in the array_push?