I tried to conclude the tread I started last time on how to Auto generate serial numbers as seen here Auto generate serial numbers. On my own I have been able to come out with a code that give me what I want.
Using this line of code
SELECT COUNT(donor_id) + 1 AS Counter
FROM tbl_donors
I got the value I want which is 6+1; i.e. 6 being the total number of records and 1 is the additional for the new record. But now how to add it to the tableset that will show all the values as seen here http://www.netdataflow.com/rbme/ is where I am having a problem. I am using dreamweaver to builder my tableset and below is the tableset code
<div align="center">
<table width="1100" border="0" cellpadding="0" cellspacing="0">
<tr id="colhead">
<td width="30" height="30" id="labels"><div align="center"><strong>ID</strong>
</div></td>
<td width="200" height="30" id="labels"><div align="center"><strong>Donor
Name</strong></div></td>
<td width="100" height="30" id="labels"><div align="center">
<strong>Designation</strong></div></td>
<td width="250" height="30" id="labels"><div align="center">
<strong>Address</strong></div></td>
<td width="80" height="30" id="labels"><div align="center"><strong>City</strong>
</div></td>
<td width="80" height="30" id="labels"><div align="center"><strong>State</strong>
</div></td>
<td width="80" height="30" id="labels"><div align="center">
<strong>Country</strong></div></td>
<td width="100" height="30" id="labels"><div align="center"><strong>Phone</strong>
</div></td>
<td width="150" height="30" id="labels"><div align="center"><strong>Email
Address</strong></div></td>
</tr>
<?php do { ?>
<tr <?php
// technocurve arc 3 php bv block2/3 start
echo " style=\"background-color:$color\"";
// technocurve arc 3 php bv block2/3 end
?> id="rowlines">
<td id="labels"><div align="center"><?php echo $row_rsdonors['donor_id']; ?>
</div></td>
<td id="labels"><div align="center"><?php echo $row_rsdonors['donorname']; ?>
</div></td>
<td id="labels"><div align="center"><?php echo $row_rsdonors['designation']; ?>
</div></td>
<td id="labels"><div align="center"><?php echo $row_rsdonors['address']; ?>
</div></td>
<td id="labels"><div align="center"><?php echo $row_rsdonors['city']; ?></div>
</td>
<td id="labels"><div align="center"><?php echo $row_rsdonors['state']; ?></div>
</td>
<td id="labels"><div align="center"><?php echo $row_rsdonors['country']; ?>
</div></td>
<td id="labels"><div align="center"><?php echo $row_rsdonors['phone']; ?></div>
</td>
<td id="labels"><div align="center"><?php echo $row_rsdonors['emailaddr']; ?>
</div></td>
</tr>
<?php
// technocurve arc 3 php bv block3/3 start
if ($color == $color1) {
$color = $color2;
} else {
$color = $color1;
}
Can anyone help out? If possible, I will want to add to the
SELECT COUNT(donor_id) + 1 AS Counter
FROM tbl_donors
to the first row of the table before the ID. I am open to any other idea or way or doing it, possibly manually coding the table instead of using dreamweaver dynamic tableset.
I appreciate you help in advance.
Mike