Tad Help with ADOdb
Posted: Sun Jul 23, 2006 9:35 pm
Hello All,
Well say I am using Smarty now (Yes!!!!) and I am trying to iterate over a blocks table
I have a foreach loop setup with Smarty, but I cannot find a way to get each row from ADOdb.
I have this code:
But what the end result is displayed, only the first letter of each column is displayed.
Thanks
Well say I am using Smarty now (Yes!!!!) and I am trying to iterate over a blocks table
I have a foreach loop setup with Smarty, but I cannot find a way to get each row from ADOdb.
I have this code:
Code: Select all
function show_left() {
global $prefix, $template, $db;
$blocks = array();
$sql = $db->Execute("SELECT block, custom_name, content FROM ".$prefix."_blocks WHERE isActive=1 AND position=0 ORDER BY sort DESC");
$template->assign("block", $sql->fields);
$template->display("blocks_left.htm");
}Thanks