RE: help please, patter matching problem

2002-01-12 Thread Roger Baklund
* 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

Re: help please, patter matching problem

2002-01-12 Thread Douglas Forrest
No closing quotes in prepare. Also, I've never seen code that's looks quite like that; this may be cleaner: $sth=$dbh-prepare(SELECT Contacts FROM Info WHERE Name=%$sname%); $sth-execute(); - Original Message - From: Dan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday,

Re: help please, patter matching problem

2002-01-12 Thread Douglas Forrest
: Re: help please, patter matching problem No closing quotes in prepare. Also, I've never seen code that's looks quite like that; this may be cleaner: $sth=$dbh-prepare(SELECT Contacts FROM Info WHERE Name=%$sname%); $sth-execute(); - Original Message - From: Dan [EMAIL