Relationships::UNION

A place for users and developers of the Xataface to discuss and receive support.

Relationships::UNION

Postby barryrs » Fri Aug 19, 2011 11:05 am

Hope you're ready for a wonderful weekend!!

Tried something today: I set the following as a relationship of the clients table.. it wasn't happy:) any thoughts?
I may try setting it up as a view instead... Thanks again! and I hope you do have a great weekend!! -Baer

__sql__ = "SELECT * FROM `transaction` WHERE ClientsID= '$ClientsID' UNION SELECT * FROM `transHistory` WHERE ClientsID= '$ClientsID'"
barryrs
 
Posts: 14
Joined: Tue Feb 15, 2011 11:37 am

Re: Relationships::UNION

Postby shannah » Mon Aug 22, 2011 1:47 pm

The relationship SQL parser is getting better all the time, but in general it still likes it to be simple. E.g. a join, maybe a double join... but not unions etc... This is partly because it has difficulty knowing how to insert records into a union.

If it is a read-only relationship then theoretically this type of functionality could be developed.... but the parser doesn't currently support unions.

What I generally do in a case like this is create a view with exactly what I want (i.e. the union would be part of the view definition). Then I use that view in the relationship.

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 17 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved