Wildcard help - mySQL

Dear friends,

Forgive me that my very first post is a question, but I really need to figure this out. I am trying to create a search form to search for pieces of music in an SQL database. The form is working but I’d like the form to be able to find pieces of music without having the whole name (ie: typing in “Activity” will bring up “Activity March”). I figured I need to use wildcards, but I’m not sure how. Here’s some of the code so you can get a better idea:


function process_form() {
    global $db;
    $sql = 'SELECT title, composer, arranger, folder, publisher FROM library WHERE id >= 0';
    if (strlen(trim($_POST['title']))) {
        $title = $db->quoteSmart($_POST['title']);
        $title = $db->strtr($title, array('_'=>'\_', '%'=>'\%'));
        $sql .= " AND title LIKE $title";

...

$pieces = $db->getAll($sql);
    if (count($pieces) == 0) {
        print 'No music matched.';
    } else {
        print '<table align="center" width="80%" border="1">';
        print '<tr><th>Title</th><th>Composer</th><th>Arranger</th><th>Folder</th><th>Publisher</th></tr>';
        foreach ($pieces as $piece) {
            printf ('<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>',
                    htmlentities($piece->title), htmlentities($piece->composer),htmlentities($piece->arranger), 
                    htmlentities($piece->folder), htmlentities($piece->pubisher));
        }
    }
}

Perhaps?: $sql .= " AND title LIKE %$_POST[‘title’]%"

Thank you in advance for your help.

-Tokyoboy