i want show query in smarty loop with some like title :
table1 (courses): id, title
table2 (questions): id, title, teachers_id
query:
$this->ctitle_qtitle = DatabaseHandler::GetAll("
SELECT courses.title , questions.title
FROM courses
JOIN questions
ON courses.id = questions.courses_id ");
this query work true, and in .tpl file i use loop:
{section name=i loop=$obj->ctitle_qtitle}
<tr>
<td><h3><a href="#">{$obj->ctitle_qtitle[i].title</a></h3></td>
<td>{$obj->ctitle_qtitle[i].title}</td>
<td><a href="#" class="ico del">Delete</a>
<a href="#" class="ico edit">Edit</a></td>
</tr>
{/section}
how can i use courses.title or question.title in smarty result ?