Re: PDO prepared statements and value list for MySQL "IN"
| From: | TK | Date: | Thu, 10 Jul 2008 08:06:31 +0000 |
| Subject: | Re: PDO prepared statements and value list for MySQL "IN" | ||
| References: | 1 2 3 4 5 6 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-45141@lists.php.net to get a copy of this message | ||
At 03:23 AM 7/10/2008, Thodoris wrote:
>Why don't you work this around. Since you may do anything with strings in php using the (.)
>operator try this:
>
><?php
>$a = array('string1','string2');
>$str = implode("','",$a);
>$str = "'".$str."'";
>print $str;
>?>
Thanks, but this is missing the entire point of my question, which is *can it be done with PDO
prepared statements*. These solutions you're proposing do not involve PDO's prepared
statements. I already know how to do SQL queries by hand.
Anyway, per my latest message, I found where in the PHP manual it implies that PDO prepared
statements cannot be used with the MySQL IN function, which speaks to my original question.
Thanks for trying!
- TK