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 15 May, 18:18
From: "Doctrine" <no-re...@phpdoctrine.org>
Date: Thu, 15 May 2008 17:18:23 -0000
Local: Thurs 15 May 2008 18:18
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:  closed
  Priority:  minor       |   Milestone:  0.11.1
 Component:  Attributes  |     Version:  0.11  
Resolution:  invalid     |    Keywords:        
-------------------------+------------------------------------------------- -
Changes (by romanb):

  * status:  reopened => closed
  * resolution:  => invalid

Comment:

 What you do:

 {{{
 $q = new Doctrine_Query();
 $q->from(' Users u ') ->where(' u.id in (?) ');
 $q->fetchArray(array('8,3,5,7'));
 }}}

 What you should do:

 {{{
 $q = new Doctrine_Query();
 $q->from(' Users u ') ->where(' u.id in (?,?,?,?) ');
 $q->fetchArray(array(8,3,5,7));
 }}}

 Or:

 {{{
 $q = new Doctrine_Query();
 $q->from(' Users u ') ->whereIn('u.id', array(8,3,5,7));
 $q->fetchArray();
 }}}

--
Ticket URL: <http://trac.phpdoctrine.org/ticket/1020#comment:8>
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