![]() |
MySQL and multiple likes
Observe:
PHP Code:
|
Not sure entirely what you're trying to do but have you looked into mysql's regexp capabilities - that may do it for you :)
|
Quote:
A regex will work but checking against an array is still the issue. |
MySQL has a built in substr function :)
Someone once showed me how it can be used as a search feature but i'm not entirely sure how to use it as a condition. I know it definately can be though. You could split you array into individual strings such as ' AND SUBSTR('ll',1)' or however it's used and then put $conditions at the end of your SQL query :) With me? Edit: http://www.mysql.com/documentation/m...61/content.htm |
Quote:
|
So no other ideas, then?
Some contextual code if there's still confusion: PHP Code:
|
MySQL is powerful, but not PHP - your best bet is Mist/Dean's solution to build a list of banned aliases from your array - makes for a large query (number of characters) but it's really a quick query for SQL to run ...
|
I ended up using a regular expression, delimiting everything with pipe characters.
|
All times are GMT. The time now is 12:11 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|