Select all that contains in MySql

From: Date: Thu, 03 Apr 2003 15:53:51 +0000
Subject: Select all that contains in MySql
Groups: php.general 
Request: Send a blank email to php-general+get-142161@lists.php.net to get a copy of this message
I have built a search function that searches a table for all items that match what you enter into the search field. I would like it to return all items that contain a certain string rather that matches. For example, I want to have it so that if I enter M in the search field, it will return all items that start with M. Here is what I have so far. $query = "SELECT * FROM software_assets WHERE $searchType LIKE '$search' "; Thanks, Mike

« previous php.general (#142161) next »