|
<%
$currentRow = 0;
$lastMusician = "";
while (($pictureRow = mysql_fetch_array($searchQueryResults)) && ($currentRow < $endRow)){
extract($pictureRow);
$currentRow++;
if ($currentRow >= $startRow) { // skip over rows shown on previous page
// check if we start the list for a new musician and print a header
if ($lastMusician != $pictureRow['LNAME']){
$lastMusician = $pictureRow['LNAME'];
$trOutput = "| ".$pictureRow['FNAME']." ".$pictureRow['LNAME']." | ";
echo $trOutput;
}
if ($PICFORMAT == 'landscape') {
$width = $thLandscapeWidth;
$height = $thLandscapeHeight;
} else {
$width = $thPortraitWidth;
$height = $thPortraitHeight;
} %>
|
<% echo $pictureRow['PICTITLE']%>
|
|
|
<%
}
}
%>
|
<% if ($currentRow > $resultsPerPage){%>
<%}%>
|
|
<% if ($currentRow < $nbrSearchResults) {%>
<%}%>
|
|
|
|
<%
$targetPicture = $startRow + $mainPicOffset;
$pictureCounter = 1;
$searchQueryResults = mysql_query($strSQL)
or die(mysql_error());
while ($pictureRow = mysql_fetch_array($searchQueryResults)) {
if ($pictureCounter == $targetPicture){
%>
<%}
$pictureCounter++;
} %>
|