I don't really understand fully what you want to do. It sounds like you want to save an array in the session, but I don't understand the trigger you want to use or if you are adding one item at a time or multiple. If you provide more background about that then I'm sure I can help.
For instance, if you wanted to save all of the rows in a recordset into a session variable array it would be something like:
<?php
@session_start();
if (!isset($_SESSION["TemporaryCart"])) {
$_SESSION["TemporaryCart"] = $rsQueryRecordSet->getColumnArray("ColumnName"));
}
?>