Arg, ignore previous reply: there's no edit button that I can see try this one:
(All I changed was the SQL statement, from INNER JOIN to LEFT JOIN)
<?php
//connect to a DSN ""
$conn = odbc_connect('','','');
if ($conn)
{
//the SQL statement that will query the database
$query = "Select unit.Unit_ID, unit.PropertyUnitID, unit.Street, unit.Status, viewPendingLease.StatusName as \"Future Booked\" from unit LEFT JOIN viewPendingLease ON unit.Unit_ID = viewPendingLease.Unit_ID";
//perform the query
$result=odbc_exec($conn, $query);
echo "<table border=\"2\"><tr>";
//print field name
$colName = odbc_num_fields($result);
for ($j=1; $j<= $colName; $j++)
{
echo "<th>";
echo odbc_field_name ($result, $j );
echo "</th>";
}
//fetch tha data from the database
while(odbc_fetch_row($result))
{
echo "<tr>";
for($i=1;$i<=odbc_num_fields($result);$i++)
{
$resultfield = odbc_result($result,$i);
echo "<td class='$resultfield'>";
if ($i == 5)
{
if ($resultfield == 'Pending')
{
echo "Yes";
}
else
{
echo "No";
}
}
else
{
echo $resultfield;
}
echo "</td>";
}
echo "</tr>";
}
echo "</table >";
//close the connection
odbc_close ($conn);
}
else{
echo "odbc not connected";
}
?>