Solved

MySQL Query: Detect Youtube Link

Posted on 2010-08-13
2
300 Views
Last Modified: 2012-05-10
I want a query like this:  
SELECT * from `Foobar` where (`fulltext` ????????? )

Open in new window



Where results must contain  youtube.com (case insensitive)
  AND results must also contain:
v=<the next charactor should be a letter or a number>


0
Comment
Question by:hankknight
2 Comments
 
LVL 14

Assisted Solution

by:Kalpan
Kalpan earned 200 total points
Comment Utility
Please refer following for the searching and indexing with FULLTEXT

http://devzone.zend.com/article/1304

0
 
LVL 6

Accepted Solution

by:
nitinsawhney earned 300 total points
Comment Utility
Try something similar to following.

SELECT * from `Foobar` where `fulltext` like '%youtube.com%' AND `fulltext` REGEXP ".*v=[0-9].*"

Basically in the REGEXP part we are trying to match string which has any characters before v= and then v= follows with a digit and then can have anything after that.

This REGEXP might have to tweaked for more strict checking.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

A lot of articles have been written on splitting mysqldump and grabbing the required tables. A long while back, when Shlomi (http://code.openark.org/blog/mysql/on-restoring-a-single-table-from-mysqldump) had suggested a “sed” way, I actually shell …
I use MySQL for many of my development projects in a Windows environment. To manage my databases (and perform queries) for years I used a tool called MySQL administrator.  This tool has since been replaced by MySQL Workbench. So I decided to m…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now