Hi,
I'm having a syntax problem when trying to use the wild card '%' in
my query. Here is my code
$query = 'SELECT *
FROM `memberDirectory`
WHERE `business_name` LIKE ''%'.$_POST['business_name'].'%'' OR
`address` LIKE ''%'.$_POST['address'].'%'' OR
`suite` LIKE ''%'.$_POST['suite'].'%'' OR
`city` LIKE ''%'.$_POST['city'].'%'' OR
`cat1` LIKE ''%'.$_POST['category'].'%'' OR
`cat2` LIKE ''%'.$_POST['category'].'%'' OR
`cat3` LIKE ''%'.$_POST['category'].'%''
ORDER BY `business_name`';
I do not show it here but I do a 'htmlspecialchars(trim()) on the
$_POST vars earlier in the script. However the error I'm getting is
on the line with that starts 'WHERE' and the error reads:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /
home/paloscha/public_html/result.php on line 29
Can someone maybe point me in a direction.
Thanks,
Mike
--
Mike Brandonisio * IT Planning & Support
Tech One Illustration * Database Applications
tel (630) 759-9283 * e-Commerce
[EMAIL PROTECTED] * www.techoneillustration.com
The php_mysql group is dedicated to learn more about the PHP/MySQL web database
possibilities through group learning.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php_mysql/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/