--- multi.php 2001/09/20 09:50:24 1.7 +++ multi.php 2001/11/06 12:35:37 1.8 @@ -19,7 +19,12 @@ $sql="select id,menu_num,name,html,path,type from multi where $visible_is_true and id=$p"; $sth = $dbh->prepare("$sql"); $sth->execute(); - $row=$sth->fetchrow_hash(); + if (! $row=$sth->fetchrow_hash()) { + $sth = $dbh->prepare("select min(num) as menu_num from menu"); + $sth->execute(); + $row2=$sth->fetchrow_hash(); + $row = array(id=>0,menu_num=>$row2[menu_num],name=>"Can't find page",html=>'',path=>'',type=>''); + } $title.=" : $row[name]"; if ($row[type]=="h" && find_html_file("multi",$row[html])) {