Hi guys

Hope you can help

For each row I need to pass how many rows there are in the bookings table

How can I pass this to smarty with it also knowing which row it is associated with


editdates.php

PHP Code:
$editdates "SELECT * FROM dates";
$editdatesresult mysql_query($editdates) OR die(mysql_error());

while(
$editdatesrow mysql_fetch_assoc($editdatesresult))
{
$row[] = $editdatesrow 
}

$smarty->assign('row'$row); 


editdates.tpl

PHP Code:
{foreach from=$row item=item key=key}

<
tr><td class=general><A href=>{$item.Event_Name}</a></td>
<
td class=general>{$item.Start|date_format:"%A %B %e %Y"}</td>
<
td  class=general></td>
<
td  class=general><input type=submit value="Edit Date"></td></tr>
{/foreach}
</
table