Hi
I have kind of got it working now. But something is still wrong.
If I have more than one record returned - all the records are displayed correctly.
If I have no records returned - it says - sorry search again - which os what I want
However if there is only one record returned 0 it does nothing - it doesn't display it and it doesn't say sorry.
I know I have put >1 so thats why. But if I put >0 then things don't work right either :-(
This is my code
$row = odbc_fetch_array($result) ;
if (count($row)>1)
//so have put while in to create a loop
while ($row = odbc_fetch_array($result))
{
echo
"
<table class=results>
<tr>
<td class=year>" .$row['doc_date_yr'] . "</td>
<td class=title><a href=" . $row['doc_url'] . " target=blank>" . $row['doc_title'] . "</a></td>
</tr>
</table>";
}
else
{
echo "sorry search again";
}
}