Re: [PHP-DB] PDO prepared statements and value list for MySQL "IN"

2008-07-08 Thread TK
At 04:16 PM 7/8/2008, Philip Thompson wrote: >On Jul 8, 2008, at 11:55 AM, TK wrote: > >>I'd like to use a PDO prepared statement to perform a MySQL query >>that uses the IN function. >> >>I.e.: >>$stmt = $pdo->prepare(' >> select * >> from mytable >> where myfield IN (:contents) >>); >>$stmt-

Re: [PHP-DB] PDO prepared statements and value list for MySQL "IN"

2008-07-08 Thread Philip Thompson
On Jul 8, 2008, at 11:55 AM, TK wrote: I'd like to use a PDO prepared statement to perform a MySQL query that uses the IN function. I.e.: $stmt = $pdo->prepare(' select * from mytable where myfield IN (:contents) ); $stmt->bindValue(':contents', $contents); $stmt->execute(); Here's the

[PHP-DB] PDO prepared statements and value list for MySQL "IN"

2008-07-08 Thread TK
I'd like to use a PDO prepared statement to perform a MySQL query that uses the IN function. I.e.: $stmt = $pdo->prepare(' select * from mytable where myfield IN (:contents) ); $stmt->bindValue(':contents', $contents); $stmt->execute(); Here's the problem: If $contents is set to a sing