As you already know, you will dynamically create the $contents.
See if you can dynamically create the entire prepare statement which
includes the $contents, as well as dynamically create the bindValue
statement; then see if you can "eval" those dynamically created statements.
$commandPrepare = '$
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:
>
>$a = array('string1','string2');
>$str = implode("','",$a);
>$str = "'".$str."'";
>print $str;
>?>
Thanks, but this is missing the entire poin
At 05:53 PM 7/8/2008, TK wrote:
>>>I'd like to use a PDO prepared statement to perform a MySQL query
>>>that uses the IN function.
I may have found my answer (in the PHP manual, under PDO->prepare(). Go
figure!):
"You cannot bind multiple values to a single named parameter in, for example,
t
O/H TK ??:
At 03:21 AM 7/9/2008, Thodoris wrote:
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 *
fro
At 03:21 AM 7/9/2008, Thodoris wrote:
>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 myt
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->bindValue(':cont
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-
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
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