我正在按字段获取雇主记录emp_id
,如果在First
.
另外,我将如何调整条件表达式以使用新查询?
这是我要修复的代码:
<?php
$emp = mysql_query("SELECT * FROM employees
WHERE s_id = '" .$s. "' ORDER BY emp_id ASC");
while($names = mysql_fetch_array($emp)) {
if ($names['Show'] == 'TRUE'){
?>
<table width="100%" class="round1" border="1" cellspacing="0" cellpadding="0">
<tr>
<td height="7.5%" class="name_phone"
<div>
<?php
if (($names['First'] == $names['First']) && ($names['u_id'] != $names['u_id']))
{echo $names['First'];}
else
{echo $names['First']. ' ' .$names['Last'];} ?>
</div>
</td>
</tr>
<tr>
<td class="phone">
<div>
<?php if ($names['ShowPhone'] == 'TRUE')
{echo $names['Phone'];}
else
{echo ' ';} ?>
</div>
</td>
</tr>
</table>
<?php }} ?>