flemingmike Posted November 4, 2010 Share Posted November 4, 2010 hello, i am having an issue with tables using incorrect data. i have 2 columns, first is employee name, second is location if the employee doesnt have a location for the current day, it is telling me he is at the same location as the guy in the row above him. i need this to be blank. is this possible? Quote Link to comment Share on other sites More sharing options...
flemingmike Posted November 4, 2010 Author Share Posted November 4, 2010 i am currently trying this, but no luck: echo "<td align='center'>"; if( empty($sstatus) ) { } else { echo "" . $sstatusout . ""; } echo "</td>"; Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted November 4, 2010 Share Posted November 4, 2010 You're going to need to post a bit more code than that. From the DB query through the end of the display formatting would be ideal. Quote Link to comment Share on other sites More sharing options...
flemingmike Posted November 4, 2010 Author Share Posted November 4, 2010 here it is: $result9 = mysql_query("SELECT * FROM staff ORDER BY name"); while($row9 = mysql_fetch_array($result9)) { $peid=$row9['eid']; $pname=$row9['name']; $result4 = mysql_query("SELECT * FROM schedule WHERE eid = '$peid' ORDER BY id DESC LIMIT 1"); while($row4 = mysql_fetch_array($result4)) { $sstatus=$row4['status']; if("$sstatus" == "1") { $sstatusout="<font color='#0000FF' size='4'>Waiting For Arrival</font>"; } if("$sstatus" == "2") { $sstatusout="<font color='#00FF00' size='4'>Signed In</font>"; } if("$sstatus" == "3") { $sstatusout="<font color='#FF0000' size='4'>Signed Out</font>"; } } echo "<tr>"; echo "<td align='center'>" . $pname . "</td>"; echo "<td align='center'>"; if(empty($sstatusout) ) { } else { echo "" . $sstatusout . ""; } echo "</td>"; echo "</tr>"; } echo "</table>"; Quote Link to comment Share on other sites More sharing options...
flemingmike Posted November 4, 2010 Author Share Posted November 4, 2010 im starting to think this cant be done. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.