Try:

$query = "SELECT * FROM software_assets WHERE $searchType LIKE
'$search%' ";

Note the percent sign, this is equivalent to a wildcard (* for
instance).

On Thu, 2003-04-03 at 10:53, Mike Tuller wrote:
> 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
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to