HW 1 Query 3 .
This page will implement the following websql query:
select d2.base,d2.label from document d1, anchor d2 such that d1 mentions xml where d1.length>100;

where d1.length> ;


Steps to implement this query:
** This query must be run after Query 1
1. get url, length from document table (check length > 100), retrieve file, make sure it mentions "umr" by parsing
2. get base, label from anchor table where base = url

Results:

====================================================================

= $length) { $word_found = FALSE; //echo "$conurl || "; //echo "$conlength
"; $f = @fopen($conurl,"r"); while( $buf = fgets($f,1024) ) { $buf = fgets($f, 4096); if ( preg_match ("/$content/",$buf, $array) ) { $word_found = TRUE; } } fclose($f); } } if ($word_found) { $sql="SELECT * FROM anchor"; $rs=odbc_exec($conn,$sql); while (odbc_fetch_row($rs)) { $conbase=odbc_result($rs,"base"); $conlabel=odbc_result($rs,"label"); print "$conbase
"; print "$conlabel

"; } } odbc_close($conn); //close DB connection } ?>