<form method="POST" action="playlist.php"> <p> "Search <? InputText("search",$search,'',20); ?> <input type="submit" value="Go" name="B1"> Display <? InputCombo("limit",$limit,25,'5,10,25,50,100'); ?> results </p> </form>Search by Artist:<br><? for($c=ord('0');$c<=ord('9');$c++) { $v = chr($c); if ($c<>ord('0')) {echo ", ";} echo "<a href='?letter=$c'>$v</a>"; } echo "<br>"; for($c=ord('A');$c<=ord('Z');$c++) { $v = chr($c); if ($c<>ord('A')) {echo ", ";} echo "<a href='?letter=$c'>$v</a>"; } echo "<br>"; for($c=ord('??');$c<=ord('??');$c++) { $v = chr($c); if ($c<>ord('??')) {echo ", ";} echo "<a href='?letter=$c'>$v</a>"; } ?> <br>
if((isset($letter)) && (!$letter=="")) { $nextletter = chr(ord($letter)+1); if($letter=='0') $where .= " AND NOT((artist>='A') AND (artist<'ZZZZZZZZZZZ')) "; else { $db->AddStr($letter); $db->AddStr($nextletter); $where .= " AND ((artist>=:letter) AND (artist<:nextletter)) "; } } else { $letter=""; }
if((isset($letter)) && (!$letter=="")) { $where .= " AND (ORD(UCASE(LTRIM(LEFT(artist,1)))) = '$letter') "; } else { $letter=""; }