![]() |
REGEXP not working right?
This is what I am using:
Quote:
I was under the impression i could use the following to do what I wanted: Quote:
|
Maybe LIKE works better for you
Code:
SELECT * FROM Recipe WHERE Category LIKE '%seafood%' OR Category LIKE '%lunch%' ORDER BY RAND() LIMIT 5;"); Code:
SELECT * FROM Recipe WHERE Category LIKE '%seafood' OR Category LIKE '%lunch' ORDER BY RAND() LIMIT 5;"); More pattern matching examples and options: https://dev.mysql.com/doc/refman/8.0...-matching.html |
Faperoni is right, you should consider just using like. REGEXP is hard as fuck and if you are a beginner you simply aren't going to be able to grasp it just yet because people who have been coding for 20 years have issues with it.
|
Quote:
I've been slamming code for a hell of a long time and hate the fuck out of reguar expressions. Like will do it for you most of the time. :thumbsup . |
All times are GMT -7. The time now is 08:09 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123