* Adrian Hungate ([EMAIL PROTECTED]) [010420 05:06]:
> May be I am misunderstanding your problem here, but are you suggesting that
> SELECT tab1.col1 col1, tab2.col1 col2
> FROM ... etc ...
> Does not expose 'col1' and 'col2' in the namespace for you? This is not my
> experience. Ok, I only have about 50 ZSQL methods on my intranet but they
> are all complex queries with column naming clashes. If it failed to work as
> you are suggesting, I would not have continued using Zope - Database
> connectivity was one of my criteria.
I mean that:
SELECT tab1.col1, tab2.col1
FROM ... etc ...
Does not expose 'tab1.col1' and 'tab2.col1'. In otherwords, it
doesn't gracefully handle name clashes. I realize that calling out
the variable 'tab1.col1' out of the namespace is a pain, but
(hopefully) in the future it would be made easier.
Perhaps like so:
<dtml-var name='tab1.col1'> (note single quotes)
> The normality (or abnormality) of your databases should make no difference,
> (Except to how complex your individual SQL statements become). What database
> are you running against? Maybe you have hit a database connector bug?
Postgresql. I've tried all three of the DAs: Psyco, Popy and
[Nice Example Snipped]
What DB was that? The syntax isn't what I expect from Postgres,
Tandem and MySQL.
> As far as the 'foo=0' example, if you set foo to 0, and do nothing in
> between to change it, of course a test for not equal to 0 will fail, what
> would you expect?
Here is the example again, but better:
<dtml-if expr="foo <> 0">Not Zero<dtml-else>Zero</dtml-if>
If called like so:
It will ALWAYS print 'Zero'.
This makes it hard to do something with a param that defaults to
xref_url_category.categoryid as category_id,
<dtml-sqltest category_id column="xref_url_category.categoryid" type="int">
xref_url_category.urlid = url.id
You can't even replace the param with "category_id:int=0" and then
check for category_id <= 0 in the dtml-ifs.
I finished my project, so I'm happy for the moment. I have another
ZSQL project (a DVD, Comic Book and Video tracker for my Manga and
Anime), so I'll be back.
Thanks to everyone who spent time to help out.
Who are you going to believe, me or your own eyes?
-- Groucho Marx
The Doctor What: Guru to the Gods http://docwhat.gerf.org/
[EMAIL PROTECTED] KF6VNC