php.net |  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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: paul dot zorn at gmail dot com
New email:
PHP Version: OS:

 

 [2005-12-03 21:10 UTC] paul dot zorn at gmail dot com
Description:
------------
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.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-03 23:50 UTC] tony2001@php.net
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-2024 The PHP Group
All rights reserved.
Last updated: Wed Dec 11 03:01:28 2024 UTC