// Define the query, be sure to leave off the trailing ; in the query (feature: trim off the ; if it exists)
$q = "";

// The columns that you want available in the header
$cols = array(
              'email' => "Email",
              'lastname' => "Lastname",
              'firstname' => "Firstname"
);

// recorset events
$evts = array(
              'rowClick' => "GBS.util.form('?a=userDetails&uid={{id}}');",
              'rowOver' => "",
              'description' => ""
);


// output the recordset
echo $GLOBALS['gbs.db']->sortableRecordSet($q, $cols, $evts);

// the id of the recordset is stored in the session
$recordset_id = $_SESSION['last_recordset'];