How comfortable are you with hand coding php? This would take a bit of hand coding to get working.
You would probably have to do a couple of Recordsets. One Recordset would grab all the Engine names for the first table row. Loop thru this Recordset to get all the Engine names and then display them as the first row of your table.
Another Recordset would grab all the data, grouped and sorted so that you loop thru it row-by-row it displays correctly. Then loop thru this to write all the subsequent table rows.
You will need to be comfortable hand coding php and writing custom MySQL queries.