{assign var="pgLayout" value="file:./layouts/lite.tpl"}
<h2 class="withBG">My Survey History</h2>

{select_query return="array" assign="aSurveys"}
st.surveyId, st.dateTaken, st.pointsEarned, s.surveyName 
FROM surveys_taken st
LEFT JOIN surveys s ON (s.id = st.surveyId)
WHERE userId = {$user->id} 
ORDER BY dateTaken
{/select_query}

{display var=$aSurveys}