Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

MySQL regular expression to match a imploded item

 
   Database Help (Home) -> PHP SQL RSS
Next:  Stupid setcookie() question...  
Author Message
David Strencsev

External


Since: Feb 21, 2005
Posts: 1



(Msg. 1) Posted: Mon Feb 21, 2005 5:40 pm
Post subject: MySQL regular expression to match a imploded item
Archived from groups: alt>php>sql (more info?)

Hello

I need to use MySQL's REGEXP (POSIX compliant) to search registries where
one field is an imploded set of integer values separated with pipes "|".
I need to match one of these imploded values directly on a sql select.
$sql = "SELECT FROM table WHERE imploded REGEX "????" . $number . "????";

Example, with the string "10|3|605|40" I need to match 605 but not 5, match
40 but not 4.
I'm not expert in regular expressions and I can't find the proper one.

Any help?

Thanks in advance
- David Strencsev

 >> Stay informed about: MySQL regular expression to match a imploded item 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
php + MySQL problems - I'm trying to get php + MySQL running on my web server. I tested the setup on an old RH8 server install that I was going to upgrade; everything worked fine. So I wiped out the old RedHat, installed Fedora Core 2, and repeated the installation. No dice...

Accounts in Mysql - Hello, Learning about Mysql Accounts, there is something I like to ask for. I have made some database tests as root mysql with [gastonv@telenetPC ~]$ mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL....

php and mySql - I get an error message while trying to follow these procedures: http://www.howtoforge.com/intrusion-...on-ubuntu-7.10 Here is the error: Fatal error: Call to undefined function mysql_connect() in /var/www/adodb5/drivers/adodb-mysql.inc.php on line 363..

[MySQL] hierachy problem ... - Hello, I have a table which have these fields: - id - idParent - label I would like to display each field and his children but each parent may have no child. Example: A AA AB AC B C CA CB .... I can't write the request, could you help me?....

simple question I think...about PHP/mySQL - I want to make a website that starts with letters A thru Z . Click on the letter A you get a list of surnames beginning with A.... Click on surname A..... you get a table with all the information from a mySQL on the people with that surnames. My simpl...
   Database Help (Home) -> PHP SQL All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]