Google Groups Home
Help | Sign in
Message from discussion #1020: Can't pass comma separated fields on a single parameter query
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Doctrine  
View profile
 More options 10 May, 21:59
From: "Doctrine" <no-re...@phpdoctrine.org>
Date: Sat, 10 May 2008 20:59:13 -0000
Local: Sat 10 May 2008 21:59
Subject: Re: [Doctrine] #1020: Can't pass comma separated fields on a single parameter query
#1020: Can't pass comma separated fields on a single parameter query
-------------------------+------------------------------------------------- -
  Reporter:  teixi       |       Owner:  jwage
      Type:  defect      |      Status:  new  
  Priority:  minor       |   Milestone:  0.11.2
 Component:  Attributes  |     Version:  0.11  
Resolution:              |    Keywords:        
-------------------------+------------------------------------------------- -
Comment (by teixi):

 Dear Jonathan,[[BR]]
 [[BR]]
 If you create database and mappings as of my tutorial
 http://www.teixi.net/hands_on_doctrine/[[BR]]
 [[BR]]
 then add this simple query:[[BR]]

 $c=array('ca_ES','es_ES','en_US');[[BR]]
 $q = new Doctrine_Query();[[BR]]
 $q->from(' SysLang sl ')->where(' sl.id in (?) ');[[BR]]
 $q->fetchArray($c); [[BR]]
 [[BR]]
 produces:[[BR]]
 [[BR]]
 Fatal error: Uncaught exception 'Doctrine_Connection_Mysql_Exception' with
 message 'SQLSTATE[HY093]: [[BR]]
 Invalid parameter number: number of bound variables does not match number
 of tokens' in [[BR]]
 /home/teixi/workspace/resources/Doctrine-0.11.0-RC2/Doctrine-0.11.0/lib/Doc trine/Connection.php:1050
 [[BR]]
 Stack trace: #0 [[BR]]
 /home/teixi/workspace/resources/Doctrine-0.11.0-RC2/Doctrine-0.11.0/lib/Doc trine/Connection/Statement.php(244):
 [[BR]]
 Doctrine_Connection->rethrowException(Object(PDOException),
 Object(Doctrine_Connection_Statement)) #1 [[BR]]
 /home/teixi/workspace/resources/Doctrine-0.11.0-RC2/Doctrine-0.11.0/lib/Doc trine/Connection.php(979):
 [[BR]]
 Doctrine_Connection_Statement->execute(Array) #2 [[BR]]
 /home/teixi/workspace/resources/Doctrine-0.11.0-RC2/Doctrine-0.11.0/lib/Doc trine/Query/Abstract.php(948):
 [[BR]]
 Doctrine_Connection->execute('SELECT s.id AS ...', Array) #3 [[BR]]
 /home/teixi/workspace/resources/Doctrine-0.11.0-RC2/Doctrine-0.11.0/lib/Doc trine/Query/Abstract.php(994):
 [[BR]]
 Doctrine_Query_Abstract->_ex in [[BR]]
 /home/teixi/workspace/resources/Doctrine-0.11.0-RC2/Doctrine-0.11.0/lib/Doc trine/Connection.php
 on line 1050[[BR]]

--
Ticket URL: <http://trac.phpdoctrine.org/ticket/1020#comment:2>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google