On Wed, 2003-07-30 at 11:17, Aaron Wolski wrote: > Hey, > > Thanks. > > Is there anyway this can be performed one function/loop? > yes of course. =) just create a function that takes in two letters as a parameter, then build the query string from it. function($char_begin, $char_end) { $q_begin = strtolower($char_begin); $q_end = chr(ord(strtolower($char_begin))+1); $query = "SELECT designer_name FROM designer WHERE designer_name BETWEEN '".$q_begin."' AND '".$q_end."' ORDER BY designer_name"; //do your query here. } > I knew it was possible with several queries.. I guess I was just looking > for a all_in_one solution. > > Thanks for your help! > Aaron > > -----Original Message----- > From: Ramil G. Sagum [mailto:ramil@astra.ph] > Sent: July 29, 2003 11:07 PM > To: Aaron Wolski > Subject: Re: alphabetical sorting... limiting and paginating > onnext set of letter group > > On Wed, 2003-07-30 at 10:36, Aaron Wolski wrote: > > Hi Guys, > > What I would like to do is: > > Pattern Designers: > > > > A/B/C > > > > Artists Collection The > > Barrick Samplers > > Bent Creek > > Bobbie G. Designs > > Calico Crossroads > > Charland Designs > > Country Cross Stitch > > > Click for D/E/F > > Click for G/H/I > > Click for J/K/L > > > > When the user clicks on one of the another Letter Groupings... the > > "A/B/C" changes to whatever they selected as does the displayed > results > > for their selection. > > > > Is this even possible? > > > > Aaron > > yes it is. =) > > try for a/b/c > > SELECT designer_name FROM designer WHERE designer_name BETWEEN 'a' AND > 'd' ORDER BY designer_name; > > for d/e/f : > > SELECT designer_name FROM designer WHERE designer_name BETWEEN 'd' AND > 'g' ORDER BY designer_name; > > for j/k/l: > > SELECT designer_name FROM designer WHERE designer_name BETWEEN 'j' AND > 'm' ORDER BY designer_name; > > > > hope this helps. > > > ramil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php