View Single Post
Old 09-03-2012, 11:19 PM   PM User | #2
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
What kind of data is contained in 'staff_approved'? Why can't you just check the value rather than trying to do a substr?
PHP Code:
<?php
while($rows=mysql_fetch_array($result))
{
    
$rows['date'] = date"d/m/Y"$rows['date_ts'] );
?>
    <tr>
        <td nowrap><?php echo $rows['datefield']; ?></td>
        <td nowrap><?php echo $rows['shift']; ?></td>
        <td nowrap> <?php echo $rows['reason'];?></td>
        <td nowrap> <?php echo $rows['person_covering']; ?></td>
        <td nowrap> &pound;<?php echo $rows['cost']; ?></td>
        <td nowrap><?php if(strncasecmp(trim($rows['staff_approved']),'yes') != 0)
        {
            
?>
            <a href="updaterecord.php?id=<?php echo $rows['id'];?>">Edit</a>
            <?php
        
}
        
?>
        </td>
    </tr>
<?php
}
?>
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||
_Aerospace_Eng_ is offline   Reply With Quote