Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Comparing two columns from a join
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
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
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
alex  
View profile  
 More options Oct 11 2012, 10:50 am
From: alex <alex.lateng...@gmail.com>
Date: Thu, 11 Oct 2012 07:50:48 -0700 (PDT)
Local: Thurs, Oct 11 2012 10:50 am
Subject: Comparing two columns from a join

Hi, i'm trying to do something like:

$data=FisrtTableQuery::create()
->join('SecondTable')
->where('FirstTable.Column = SecondTable.Column')
->find();

The correct condition after parsing the query should be an equivalent of:

"SELECT * FROM  first_table JOIN second_table ON
second_table.first_pk=first_table.first_pk WHERE first_table.column =
second_table.column"

but for the WHERE condition i'm getting:

"FirstTable.Column = second_table.column"

if i invert the order of the columns i get:

"second_table.column = FirstTable.Column"

So it's always the column from the table of the Query Object which never
gets parsed.

Any tips on how i might accomplish this?

thanks.


 
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.
William Durand  
View profile  
 More options Nov 22 2012, 6:40 pm
From: William Durand <william.dura...@gmail.com>
Date: Fri, 23 Nov 2012 00:39:52 +0100
Local: Thurs, Nov 22 2012 6:39 pm
Subject: Re: [propel] Comparing two columns from a join

Hi Alex,

I've pushed a test with what you described here:
https://github.com/propelorm/Propel/commit/053db09ca8307ba821e3e190c4....
I don't have any problems. Do you use the latest Propel version? Maye try
with the master branch.

Cheers,
William

--
William Durand | http://www.williamdurand.fr


 
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.
End of messages
« Back to Discussions « Newer topic     Older topic »