PDO has the same issue with non-name based parameters
<?php
$dbh = new PDO('###', '###', '###');
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$stmt = $dbh->prepare(");");
$a = 'a';
$b = 'b';
$stmt->bindParam(1,$a);
$stmt->bindParam(2,$b);
$stmt->execute();
On Wednesday, 19 August 2015 14:52:40 UTC-7, kontakt wrote:
>
> On Wed, Aug 19, 2015 at 10:37 PM, Calvin Dallimore <[email protected]
> <javascript:>> wrote:
>
>> Hi,
>>
>> I ran into an issue when trying to run the following code:
>>
>> $test = $database_connection->prepare(");");
>> $test->bindValue(1, 'b');
>> $test->bindValue(2, 'c');
>> $test->execute();
>>
>> As you can see the query is invalid. If you don't call bindValue then the
>> execute statement throws an exception, but when you call bindValue it does
>> not throw an exception.
>>
>
> What happens if you do the same with just PDO?
>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "doctrine-user" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/doctrine-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.