[advanced search]
Results from the most recent live auction are here.
17 members in the live chat room. Join Chat!
Register Rules & FAQ NP$ Store Active Threads Mark Forums Read
Domain Name Industry Newsletter
Go Back   NamePros.Com > Design and Development > Programming
User Name
Password

Old 04-07-2008, 06:13 PM   · #1
evdoxos
NamePros Member
 
Trader Rating: (0)
Join Date: Mar 2008
Posts: 40
NP$: 200.00 (Donate)
evdoxos is an unknown quantity at this point
MySQL: REGEXP

I want to make the following but using REGEXP:
SELECT * FROM table_Name WHERE (field_name LIKE 'key1' AND field_name LIKE 'key2' AND field_name LIKE 'key3');

Here is a way:
SELECT * FROM table_Name WHERE (field_name REGEXP ('key1') AND field_name REGEXP ('key2') AND field_name REGEXP ('key3'));
IS THERE A FASTER WAY?


Please register or log-in into NamePros to hide ads
evdoxos is offline   Reply With Quote
Old 04-07-2008, 07:23 PM   · #2
SecondVersion
while ($awake){ code(); }
 
SecondVersion's Avatar
 


Name: Eric
Location: Kentucky
Trader Rating: (143)
Join Date: Mar 2005
Posts: 4,261
NP$: 540.00 (Donate)
SecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond repute
Member of the Month
MOTM September 2005 Save a Life Child Abuse 9/11/01 :: Never Forget Baby Health Marrow Donor Program AIDS/HIV Breast Cancer Cystic Fibrosis Ethan Allen Fund Animal Cruelty Ethan Allen Fund Ethan Allen Fund Cancer Alzheimer's Protect Our Planet
Code:
SELECT * FROM table_Name WHERE field_name REGEXP('^key.*$')
__________________

SecondVersion.com - The Personal Blog of SecondVersion
Domain Name Portfolio - Get your free copy. - Version 1.0.3 now available!!
SecondVersion is offline   Reply With Quote
Old 04-07-2008, 07:42 PM   · #3
evdoxos
NamePros Member
 
Trader Rating: (0)
Join Date: Mar 2008
Posts: 40
NP$: 200.00 (Donate)
evdoxos is an unknown quantity at this point
I was meaning:

SELECT * FROM table_Name WHERE (field_name REGEXP ('a_word') AND field_name REGEXP ('an_other_word') AND field_name REGEXP ('a_third_word'));

where the words: a_word, an_other_word, a_third_word are generally completely different.

Last edited by evdoxos : 04-07-2008 at 07:46 PM.
evdoxos is offline   Reply With Quote
Closed Thread

NamePros is a revenue sharing forum.

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Site Sponsors
Traffic Down Under Hunting Moon Hunting Moon
Advertise your business at NamePros
All times are GMT -7. The time now is 08:02 PM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0