我正在尝试在我的 SQL 查询报告中添加一个文本区域,以 PHP 输出。该数据库包含饮料公司的工作申请,这些申请通过主页上的表格提交。我想添加一个注释列,以便经理们可以在他们被召回的情况下,如果他们得到工作等等,为了使用该系统的其他经理的利益(所以人们不会被叫两次, 例如)。
这是我目前正在使用的报告代码,但我想我可能忽略了一些东西。(请原谅任何不正确的缩进,我不太习惯将代码粘贴到其中)
<body>
<?require_once $_SERVER['DOCUMENT_ROOT']."/includes/incFunctions.php";
opendb();
function getTeamData() {
$sql = "SELECT * from team WHERE t_preferredCity='Liverpool' order by t_id desc";
$result=mysql_query($sql);
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
$teamData[] = $row;
}
return $teamData;
}
$teamApps = getTeamData();
echo "<!--";
//print_r($teamApps);
echo "-->";
?>
<table id="rounded-corner" width="100%">
<tr style="font-weight:bold;">
<th>Photo</th>
<th>Name</th>
<th>D.O.B.</th>
<th>Contact No.</th>
<th>E-mail</th>
<th>Preferred City</th>
<th>Availabilty</th>
<th style="width:70px;">Own Car?</th>
<th>Previous Work</th>
</tr>
<?
$i=0;
foreach($teamApps as $teamApp) {
$i++;
?>
<tr>
<td>
<?
if (substr($teamApp["t_picture"],0,3)=="htt"){?>
<a onclick="window.open(this.href);return false"href="<?=$teamApp["t_picture"]?>"><img style="width:100px;"src="<?=$teamApp["t_picture"]?>" alt="<?=$teamApp["t_name"]?>"/></a>
<?}else{?>
NO PHOTO
<?}?>
</td>
<td><?=$teamApp["t_name"]?></td>
<td><?=$teamApp["t_dob"]?></td>
<td><a href="tel:<?=$teamApp["t_contact"]?>"><?=$teamApp["t_contact"]?></a></td>
<td><a href="mailto:<?=$teamApp["t_email"]?>"><?=$teamApp["t_email"]?></a></td>
<td><?=$teamApp["t_preferredCity"]?> </td>
<td>
<?=($teamApp["t_nightsMo"] ? "Mon," : "")?>
<?=($teamApp["t_nightsTu"] ? "Tue," : "")?>
<?=($teamApp["t_nightsWe"] ? "Wed," : "")?>
<?=($teamApp["t_nightsTh"] ? "Thur," : "")?>
<?=($teamApp["t_nightsFr"] ? "Fri," : "")?>
<?=($teamApp["t_nightsSa"] ? "Sat," : "")?>
<?=($teamApp["t_nightsSu"] ? "Sun" : "")?>
</td>
<td><?=($teamApp["t_ownCar"]==-1 ? "<span class=\"yes\">Yes</span>" : "<span class=\"no\">No</span>")?></td>
<td><?=$teamApp["t_previousWork"]?></td>
<td><form><textarea rows="5" cols="20"><?=$teamApp["t_notes"]?></textarea><input type="submit" value="Submit"></form></td>
</tr>
<?
}?>
</table>
<?
closedb();
?>
</body>
您会注意到,我已经开始向 Notes 列添加一个表单,但我几乎可以肯定这不会起作用,因为我不知道如何将文本添加到 Notes 列。
任何帮助将不胜感激,如果我需要扩展任何内容,请告诉我。
谢谢 :)