sql_query("select * from products order by position"); $products = $db->fetched_array(); $smarty->assign("prods",$products); $db->sql_query("select * from text where id='product'"); $text = $db->fetched_array(); $smarty->assign("welcome",$text[0]); $smarty->display("products.html"); ?>