So if I did something like $temp = $surname_from."{"; select * from consumers surname BETWEEN '$surname_from' AND '$temp'
it should do the trick? > -----Original Message----- > From: Roger Baklund [mailto:[EMAIL PROTECTED]] > Sent: 05 March 2002 11:49 > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: RE: BETWEEN... LIKE query > > > * Craig Shepherd > > select * from consumers surname BETWEEN '$surname_from' AND > '$surname_to' > > > > assume $surname_from = A and $surname_to = B > > > > would only return results where the surname is A or greater but > > less than B, but I would like to include all records where records > > also start with B. > > Append a high ascii value to the $surname_to, like '{', so that your query > will be: > > select * from consumers surname BETWEEN 'A' AND 'B{' > > -- > Roger > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail > <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php