[nycphp-talk] Partial Name Lookup Function in PEAR
leeeyerman at aol.com
leeeyerman at aol.com
Wed Aug 31 21:18:49 EDT 2005
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/20050831/5a10ff19/attachment.html>
More information about the talk
mailing list