Welcome Guest, Not a member yet? Register   Sign In
Using subqueries
#2

[eluser]jmadsen[/eluser]
Dave,

the expression you are trying to create is like this:

Code:
SELECT * FROM users WHERE email LIKE '%jeff%' OR email LIKE '%madsen%'

Create this using REGEXP:

Code:
SELECT * FROM users WHERE email REGEXP 'jeff|madsen'

NOTE! the lack of whitespace inside the quotes - if you have it there, it will be searched on literally (i.e., ' jeff | madsen ' will only look for jeff or madsen, never jeffmadsen)


Messages In This Thread
Using subqueries - by El Forum - 06-16-2012, 10:40 AM
Using subqueries - by El Forum - 06-16-2012, 03:14 PM
Using subqueries - by El Forum - 06-20-2012, 11:00 AM
Using subqueries - by El Forum - 06-21-2012, 01:08 AM
Using subqueries - by El Forum - 06-21-2012, 01:57 AM
Using subqueries - by El Forum - 06-21-2012, 02:02 AM
Using subqueries - by El Forum - 06-21-2012, 02:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB