|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35534 SQLSTATE HY093 Error
Submitted: 2005-12-03 21:10 UTC Modified: 2005-12-03 23:50 UTC
From: paul dot zorn at gmail dot com Assigned:
Status: Not a bug Package: PDO related
PHP Version: 5.1.1 OS: Fedora 3
Private report: No CVE-ID: None
 [2005-12-03 21:10 UTC] paul dot zorn at gmail dot com
I was doing an update with the method: $dbh->query($update).

I was getting the error. SQLSTATE[HY093]: Invalid parameter number: mixed name and positional parameters.

The problem was that my value string inside the query had a single semi-colon. And was causing this error. If i made it a double semi-colon it worked right.

Reproduce code:
The main code was a update statement for mysql:
UPDATE session SET user_id = '1', session = '$val' WHERE session_key = '$session_key'

The $val == 'started|i:1;i;user_id....'

Expected result:
I don't expect that the semi-colon inside the val code would through this error.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-03 23:50 UTC]
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Duplicate of bug #35368
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Feb 28 19:01:24 2021 UTC