* Dan > Can someone tell me what's wrong with this code: > > $sth=$dbh->prepare("SELECT Contacts FROM Info WHERE Name=?); > > $sth->execute("%$sname%");
You should use the LIKE operator: Name LIKE "%roger%" <URL: http://www.mysql.com/doc/S/t/String_comparison_functions.html > -- Roger --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php