Like
eharetea

The LIKE statement in mysql.

A good string searching method.

Date Created:Friday December 29th, 2006 03:41 AM
Date Modified:Friday August 01st, 2008 12:56 PM

#php:
 $query = 'SELECT link_id, link_type FROM comment WHERE (short_desc LIKE \'%' . $search . '%\' OR long_desc LIKE \'%' . $search . '%\')';

#mysql:

SELECT comment_id, link_type, link_id, short_desc FROM comment WHERE (short_desc LIKE '%math%' OR long_desc LIKE '%math%');