PDA

View Full Version : Vertical repeat region.


derekwit
01-30-2006, 05:42 PM
I have created a coldfusion site and I am pulling data from a database. I
am repeating one of my data fields (vertically) I am using the <span>
element. My question is how do I get the <span> to only go over 5 records
and repeat below it.

Thanks for any help given.

domedia
01-30-2006, 05:45 PM
You have to do this server side. Count to 5 then insert a
.
Since I'm not a programmer (but I know alot of them ;) ) I can't show you how, but I'm sure someone here can post actual code if you need it.

davidj
02-01-2006, 08:10 AM
important:

if (you were into php) {echo "then i would have written it for you";}

else

{echo 'you have to work it out from this example';}

example...
<body>

<?php
$cnt = "1"; do { ?>

<?php
if ($tot > 0){

if (is_int($tot)){echo '<span >'.$row_Recordset1['pfm_work_job'].'</span>
';}
else
{echo '<span>'.$row_Recordset1['pfm_work_job'].'</span>';} }
?>

<?php
$tot = $cnt / 5;
$cnt = $cnt + 1;

} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>


</body>