RE: [PHP] Find rows by 1st letter in MySQL

From: Date: Sun, 18 Aug 2002 23:08:13 +0000
Subject: RE: [PHP] Find rows by 1st letter in MySQL
Groups: php.general 
Request: Send a blank email to php-general+get-113166@lists.php.net to get a copy of this message
Try Select blah from blah where blah like '$letter%' % is wildcard after first letter Regards..... --------------------------------------------------------------------------- Chris Kay Technical Support - Techex Communications Website: www.techex.com.au Email: chris.kay@techex.net.au Telephone: 1300 88 111 2 - Fax: (02) 9970 5788 Address: Suite 13, 5 Vuko Place, Warriewood, NSW 2102 Platinum Channel Partner of the Year - Request DSL - Broadband for Business --------------------------------------------------------------------------- > -----Original Message----- > From: DL Neil [mailto:PHPml@DandE.HomeChoice.co.uk] > Sent: Monday, 19 August 2002 8:43 AM > To: Tony Harrison > Cc: php-general@lists.php.net > Subject: Re: [PHP] Find rows by 1st letter in MySQL > > > Tony, > > > How would I go about selecting rows from a MySQL table > where the first > > letter of a certain field is $letter ? > > > Depends upon the MySQL tbl's schema. > The MySQL online manual discusses wildcards (full text). > Alternatively see LEFT() and other string functions that can > be used in SELECT and WHERE clauses. > > Regards, > =dn > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#113166) next »