Tshering, Wednesday, February 06, 2002, 7:29:11 AM, you wrote:
TN> Dear list, TN> I have a telephone database which has "Name" as one of the fields/columns. TN> This field contains single name e.g Robert, double names e.g Robert TN> Downing and more than double names. I want to make a SELECT query using a TN> form whose input name is "Name" i.e '$Name' against the "Name" field in the TN> database. One can type a part/full of one part of the name, or part/full of TN> two parts of a name and goes on likewise for more than double names in the TN> input form. TN> I believe this SELECT query is accomplished using TRIM and LIKE, something TN> like: TN> $query = ("SELECT * from table_name where Name like '%" & Trim($Name) & "%' TN> "); TN> This $query is not working. TN> Could sombody please provide me a query statement that I could use for my TN> above requirement. Regular expressions will be useful for you, look at: http://www.mysql.com/doc/S/t/String_comparison_functions.html http://www.mysql.com/doc/R/e/Regexp.html TN> Thank you so much. TN> NOBBY -- For technical support contracts, goto https://order.mysql.com/ This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com --------------------------------------------------------------------- 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