RE: [PHP] Searching on AlphaNumeric Content Only
| From: | Andrea Giammarchi | Date: | Thu, 03 Sep 2009 18:21:33 +0000 |
| Subject: | RE: [PHP] Searching on AlphaNumeric Content Only | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-297644@lists.php.net to get a copy of this message | ||
> Even if the REGEXP has to change with every query?
Ben, it does not matter, this is not a PHP problem but a DB structure/select/insert/update problem.
Whatever REGEXP you use, a REGEXP is what you need to solve this problem, certainly not a PHP loop
over each row with operations for each rows.
These things are OK if you do not know REGEXP or REGEXP MySQL syntax, but in this case you should
ask for the correct REGEXP rather than talk about performances, obviously slower outside MySQL and
via a runtime interpreted language as PHP is, or other solutions which aim is to end up with
something that just emulate a select with REGEXP.
Did you get my point? Finally, when I say "you" I mean generally speaking :)
Regards
_________________________________________________________________
With Windows Live, you can organize, edit, and share your photos.
http://www.microsoft.com/middleeast/windows/windowslive/products/photo-gallery-edit.aspx