Posted by mickysoft.org@gmail.com on 04/05/07 09:02
> <?php
> // other code here....
> $query = odbc_exec($odbc, "SELECT * FROM DataBaseTable") or die
> (odbc_errormsg());
> while($row = odbc_fetch_array($query))
> {
> echo ''.$row['DataField1'].'<br />';
> echo ''.$row['DataField2'].'';
> $Criteria = $row['DataField3'];
> echo '<a
> href="testcallscript.php?$TableField=[$Criteria];">'.$Criteria.'</a> - ';
> echo ''.$row['ShrtDate'].' - ';
> echo ''.$row['RTime'].' - ';
> echo ''.$row['Age'].'<br />';}
>
> ?>
hey,
The scripts seems to be functional but i would use a table for the
output, also i would give some names to the DataField* database fields
so the person that will work on this in the future knows what they`re
used for :)
if this hasn`t answered your question please restate it :)
///////////// code start ///////////////
<?
// $odbc settings
?>
<table width="600" cellpadding="0" cellspacing="1" bgcolor="cccccc">
<tr bgcolor="White">
<td>result ID</td>
<td>DataField1</td>
<td>DataField2</td>
<td>DataField3</td>
<td>ShrtDate</td>
<td>RTime</td>
<td>Age</td>
</tr>
<?php
$query = odbc_exec($odbc, "SELECT * FROM DataBaseTable") or die
(odbc_errormsg());
while($row = odbc_fetch_array($query))
{
?>
<tr bgcolor="White">
<td><?=$cnt?></td>
<td><?=$row['DataField1']?></td>
<td><?=$row['DataField2']?></td>
<td><a href="testcallscript.php?$TableField=<?=$row['DataField3']?
>"><?=$row['DataField3']?></a></td>
<td><?=$row['ShrtDate']?></td>
<td><?=$row['RTime']?></td>
<td><?=$row['Age']?></td>
</tr>
<?
}
?>
</table>
///////////// code end ///////////////
[Back to original message]
|