[nycphp-talk] Partial Name Lookup Function in PEAR
Phil Duffy
phil at bearingasset.com
Thu Sep 1 05:32:46 EDT 2005
Lee,
Thanks for the clue. That will get me started.
Phil
_____
From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On
Behalf Of leeeyerman at aol.com
Sent: Wednesday, August 31, 2005 8:19 PM
To: talk at lists.nyphp.org
Subject: Re: [nycphp-talk] Partial Name Lookup Function in PEAR
I do not know about PEAR but if you are just trying to look up a first or
last name (or anything other name/text) using only a partial piece of
information the LIKE command is best.
SELECT "column" FROM "table" WHERE "column_name" LIKE [PATTERN]
ie.
SELECT * FROM pics WHERE pic_name LIKE '%ANG%'
This would return all pic_name where ANG is contained in the string.
http://www.1keydata.com/sql/sqllike.html
http://www.techonthenet.com/sql/like.php
-----Original Message-----
From: Phil Duffy <phil at bearingasset.com>
To: 'NYPHP Talk' <talk at lists.nyphp.org>
Sent: Wed, 31 Aug 2005 21:05:48 -0400
Subject: [nycphp-talk] Partial Name Lookup Function in PEAR
Does PEAR offer a partial name lookup function? What is the best way to do
a partial name lookup in a database-independent manner? If I must drop back
to hard-coded MySQL calls, is the LOCATE() function the appropriate one to
use in this situation?
Any responses will be appreciated, including advice to direct these
questions to another list.
Phil Duffy
_______________________________________________
New York PHP Talk Mailing List
AMP Technology
Supporting Apache, MySQL and PHP
http://lists.nyphp.org/mailman/listinfo/talk
http://www.nyphp.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20050901/b846789b/attachment.html>
More information about the talk
mailing list