Hi people, I have been attempting to do an SQL union from an ZSQL Method with MysqlDA as my back end database. The only problem is I cant seen to get it to work. Are unions a bad thing? Should I be using something else. Eg. Get all the brands we have in our database. select brand from tableofitemsoftype1 union select brand from tableofitemsoftype2 group by brand.
From what I understand this would get all of the brands and group them together and place them in a single column results table?
When using union the order by clause needs to us a number denoting the column number instead of a column name try: select brand from tableofitemsoftype1 union select brand from tableofitemsoftype2 group by 1. ----- Original Message ----- From: Brenton Bills <fud@mail.theinternet.com.au> To: <zope@zope.org> Sent: Monday, January 17, 2000 3:47 PM Subject: [Zope] re: SQL Unions. Hi people, I have been attempting to do an SQL union from an ZSQL Method with MysqlDA as my back end database. The only problem is I cant seen to get it to work. Are unions a bad thing? Should I be using something else. Eg. Get all the brands we have in our database. select brand from tableofitemsoftype1 union select brand from tableofitemsoftype2 group by brand.
From what I understand this would get all of the brands and group them together and place them in a single column results table?
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Is there a way to change the Content Type of DTML documents?
From: Steve Drees <drees@the-bridge.net>
Is there a way to change the Content Type of DTML documents?
Yep. Just put a <dtml-call expr="RESPONSE.setHeader('Content-type', 'application/x-javascript')"> in the target of a <script src="foo">, for instance. Cheers, Evan @ 4-am
participants (4)
-
Brenton Bills -
Evan Simpson -
Jim Sanford -
Steve Drees