If you have had a heart attack and are a diabetic and have taken avandia (rosiglitazone) how do you know if its from the drug?

You don't. Avandia (rosiglitazone) has been linked to increased risk of cardiovascular events, but you cannot tell a heart attack due to Avandia (rosiglitazone) versus a heart attack due to something else, such as your diabetes.
You do not. That is the issue with the drugs randomized (expensive) studies are performed to answer your question.