WODA: FAQs

 User Interface

How can we search two tables simultaneously?
1.

If you have few tables one easy way is the following:

define in each table a common list format like:

$WBB{'formatName9'} ='Global search';
$WBB{'formatHead9'}='<table>';
$WBB{'formatRow9'}='"<tr><td>$rec{...a_field...}</td></tr>"';
$WBB{'formatFoot9'}='</table>';

define:

sub mySearchAll {
local($found, $tbl, $gg, $qq);

foreach $el (split(/\n/, $WBB{'tables'})) {
($tbl, $gg, $qq)= split(/\t/, $el, 3);
$found .= &QRY($tbl, $CGI{search}, "", "", "9", 0, 999999);
}

do printHead ("Search Results");

if ($found) {
print "<H2>Search results for: $CGI{search}</H2>";
print $found;
}
else {
print "<H2>No results for: $CGI{search}</H2>";
}
return;
}


make a form with proper fields and action going di /cgi-bin/.../table.pl/SearchAll

2.

If you have many tables I think the best way is to make a popup menu with the different tables and the search field going to a function which redirects the search the the table selected in the popup menu.

--
claudio
modify the informationdelete entire recordexplain the meaning of the fieldsbrowse recordsAdd a new questionHome page of this databaselogin Valid HTML 4.01 Transitional Valid CSS! Powered by WODA 4.6x trunk