"; } } #### end of function display_sql_results #### ## End of all functions ## ########################################################################################### ## Begin body of script ## getSQL(); ## $record is passed on the URL by the user, on an HREF, or through ## another script, e.g.: ## http://mama.stg.brown.edu/projects/tirocchi/database/measure_Db.php3?nameID=C287 $field = "name_id"; $query = "SELECT * FROM measure WHERE $field='$nameID'"; if ($query) { // Execute the SQL query here and display the results $result = runSQLQuery($query); if ($result) { display_sql_results ($result, $query, $card); } else { err_msg ("MySQL Error", "MySQL Error"); echo "\t

Query = ", $query, "

\n"; $query = ""; } } // There is no rhyme or reason to the order or existence of // any given client/name_id in the measure table, and further, // the IDs are non-numeric (they are e.g. 'C287'), so there // the following is necessary in order to determine the "next" // and "previous" records for browsing. $query2 = "SELECT name_id, measure_id, count(*) AS 'foo' FROM measure GROUP BY name_id ORDER BY measure_id"; $resultForBrowsing = runSQLQuery($query2); $numrows = mysql_num_rows ($resultForBrowsing); for ($counter=0; $counter<$numrows; $counter++) { $row = mysql_fetch_array ($resultForBrowsing); if ($counter == $numrows-1) { $next_id = $row[0]; } else { $prev_id = $curr_id; $curr_id = $row[0]; if ($curr_id == $nameID) { $numrows = $counter+2; } } } if ($nameID == $next_id) { $next_id = ""; } $full_name = getFullName($nameID); #################################################################################### ?>
", $foo); $foobar2 = eregi_replace("%%ITALIC", "", $foobar); $barfoo = eregi_replace("%ITALIC;", "", $foobar2); $barfoo2 = eregi_replace("%ITALIC", "", $barfoo); $blortfoo = eregi_replace("%eacute;", "é", $barfoo2); $blortfoo2 = eregi_replace("%lt;", "<", $blortfoo); $blortfoo3 = eregi_replace("%gt;", ">", $blortfoo2); $blortfoo4 = eregi_replace("%amp;", "&", $blortfoo3); $farble = eregi_replace("%plus;", "+", $blortfoo4); $finalCellContents = stripslashes($farble); switch ($colname) { case client_name: if ($j == 0) $client_name = $finalCellContents; break; case name_id: $name_id[$j] = $finalCellContents; break; case book_num: $book_num[$j] = $finalCellContents; break; case bust: $bust[$j] = $finalCellContents; break; case waistline_waist: $waistline_waist[$j] = $finalCellContents; break; case hips: $hips[$j] = $finalCellContents; break; case full_length_front: $full_length_front[$j] = $finalCellContents; break; case full_length_back: $full_length_back[$j] = $finalCellContents; break; case shoulder_to_waist_front: $shoulder_to_waist_front[$j] = $finalCellContents; break; case shoulder_to_waist_back: $shoulder_to_waist_back[$j] = $finalCellContents; break; case shoulders: $shoulders[$j] = $finalCellContents; break; case armhole: $armhole[$j] = $finalCellContents; break; case muscle: $muscle[$j] = $finalCellContents; break; case sleeve: $sleeve[$j] = $finalCellContents; break; case wrist: $wrist[$j] = $finalCellContents; break; case head_size: $head_size[$j] = $finalCellContents; break; case other: $other[$j] = $finalCellContents; break; } } $j++; } echo "

Client Name:

$client_name

"; for ($cnt=0;$cnt<$j;$cnt++) { echo " "; } echo " "; for ($cnt=0;$cnt<$j;$cnt++) { echo " "; } echo " "; for ($cnt=0;$cnt<$j;$cnt++) { echo " "; } echo " "; for ($cnt=0;$cnt<$j;$cnt++) { echo " "; } echo " "; for ($cnt=0;$cnt<$j;$cnt++) { echo " "; } echo " "; for ($cnt=0;$cnt<$j;$cnt++) { echo " "; } echo " "; for ($cnt=0;$cnt<$j;$cnt++) { echo " "; } echo " "; for ($cnt=0;$cnt<$j;$cnt++) { echo " "; } echo " "; for ($cnt=0;$cnt<$j;$cnt++) { echo " "; } echo " "; for ($cnt=0;$cnt<$j;$cnt++) { echo " "; } echo " "; for ($cnt=0;$cnt<$j;$cnt++) { echo " "; } echo " "; for ($cnt=0;$cnt<$j;$cnt++) { echo " "; } echo " "; for ($cnt=0;$cnt<$j;$cnt++) { echo " "; } echo " "; for ($cnt=0;$cnt<$j;$cnt++) { echo " "; } echo " "; for ($cnt=0;$cnt<$j;$cnt++) { echo " "; } echo "
Book #: $book_num[$cnt]
Bust: $bust[$cnt]
Waistline / Waist $waistline_waist[$cnt]
Hips $hips[$cnt]
Full length: Front $full_length_front[$cnt]
Full length: Back $full_length_back[$cnt]
Shoulder to Waist: Front $shoulder_to_waist_front[$cnt]
Shoulder to Waist: Back $shoulder_to_waist_back[$cnt]
Shoulders: $shoulders[$cnt]
Armhole: $armhole[$cnt]
Muscle: $muscle[$cnt]
Sleeve: $sleeve[$cnt]
Wrist: $wrist[$cnt]
Head Size: $head_size[$cnt]
Other: $other[$cnt]

General Information about:

$full_name "; ?>


"; if ($prev_id != '') { echo " <<"; } echo " Browse Measurements"; if ($next_id != '') { echo " >>"; } echo "

"; ?>

Clients with Measurements   |   Look at a Model