Forum Moderators: open
$query = "SELECT diary.*, contacts.firstname, lastname FROM diary, contacts
WHERE diary.hostid=contacts.id AND $searchterm = '$search' ORDER BY
'Start'";
$results = mysql_query( $query );
// print out the results
if($results)
{
$number = 1;
while( $diary = mysql_fetch_object( $results ) )
{
// print out the info
$id = $diary -> id;
$venue = $diary -> venue;
$space = $diary -> space;
$start = $diary -> start;
$finish = $diary -> finish;
$details = $diary -> details;
$date = $diary -> date;
$hostid = $diary -> hostid;
$firstname = $diary -> firstname;
$lastname = $diary -> lastname;
$catering = $diary -> catering;
$number = $diary -> number;
echo( "<tr><td><a href='shownotes.php?id=$id'><img
src=\"../images/arrow.png\"></img></a></td><td><a
href='alterdiary.php?id=$id&variable=space&date=$date'>$space</a></td><td><a
href='alterdiary.php?id=$id&variable=start&date=$date'>$start</a></td><td><a
href='alterdiary.php?id=$id&variable=finish&date=$date'>$finish</a></td><td>
<a href=\"alterhost1.php?id=$id&date=$date\">$firstname $lastname</td><td><a
href='alterdiary.php?id=$id&variable=venue&date=$date'>$venue</a></td><td><a
href='alterdiary.php?id=$id&variable=details&date=$date'>$details</a></a></t
d><td><a href='shownotes.php?id=$id'>$id
<?
$norows = mysql_query('SELECT noteid FROM notes WHERE notes.noteid = $id');
$num_rows = mysql_num_rows($norows);
?>
$num_rows $id