Jump to content

match word in string


dreamwest

Recommended Posts

Problem is the sting is in the database so ive gotta try and get it into a query

 

Something like this checks either number

$ids = "(567|7878)";

SELECT `id` FROM `video` WHERE `word_id` REGEXP '[[:<:]]{$ids}[[:>:]]' = 1

 

The fields look like this

 

id    word_id (VARCHAR 255)

 

1    567,676,7878

2    123,543,34

3      567,75,87

 

I checked wiki , apparently it can be done http://en.wikipedia.org/wiki/Regular_expression

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.