Hello,
That tutorial has not helped.
My main issue is how to convert an entire MySQL recordset into a Session Array or Session Variable that is also an associative array giving me access to all data in the original recordset,
I trialled the following code snippet you suggested:
<?php
@session_start();
if (!isset($_SESSION["MonclassID"])) {
$_SESSION["Monclassid"] = $ClassesCopy->getColumnArray('ClassID');
}
?>
The following code snippet:
<?php
var_dump($_SESSION["Monclassid"]);
?>
successfully lists the ID for every Monday class, the result being:
array(12) { [0]=> int(2131) [1]=> int(2086) [2]=> int(2093) [3]=> int(2077) [4]=> int(2089) [5]=> int(2065) [6]=> int(2078) [7]=> int(2106) [8]=> int(2102) [9]=> int(2120) [10]=> int(2083) [11]=> int(2109) }
This is of only limited use because the only way I can see to access data such as StartTime, ClassTitle, ClassLength and etc. is the roundabout way of doing for every column what I did for ClassID, which is return to getColumnArray() and create a new and disctinct Session Array just for that.
I then have to carefully correlate all array pointers to ensure I always have the correct data items for each ClassID.
Is there really no way to create a Session Array or Session Variable that is simply an associative array that mirrors a MrSQLi query?
Could I not then simply loop through that Session Array as easily as your tools let me loop through a MySQLi query?
Thank you.