once multiple recordsets result returned by mysql it is parsed, and fields from the first recordset are stored in an array.
one the next recordset is called by $re->NextRecordSet() the names array is not repopulated.
so, in case of different columns in those recordsets we get a serious bug with columns naming.
how to repeat: extract attached file, create stored procedure, execute attached php file.
the repeat archive