View Single Post
Old 10-11-2007, 05:46 PM  
Varius
Confirmed User
 
Industry Role:
Join Date: Jun 2004
Location: New York, NY
Posts: 6,890
Red,

Quick example to help you out:

(this part is in your php file, assuming you already connected to the Db etc...)

$sql = "SELECT field1, field2 FROM table";
$result = $db->GetAll($sql); // This is if you are using adodb

$smarty->assign('result',$result);

(this is how you loop through that data in your template)

{section name=a loop=$result}
<tr><td>whatever HTML here</td><td>{$result[a].field1}, {$result[a].field2}</td></tr>
{/section}

Hope that helps
__________________
Skype variuscr - Email varius AT gmail
Varius is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote