_______________________________
"Will I be using Python today?"
 and if the answer is "yes"
 I know that it's going to be a good day.


----- Original Message -----
From: Marko MARKOVIC <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 27, 2000 5:12 PM
Subject: [Zope] What's wrong with this snippet?


> hi all,
>
>
> i tried and searched to find the error but i couldn't solve it. Could anyone
> help me with this code:
>
> <dtml-in "GenericSQL(SQLStatement='SELECT
> ns.ns_ref,ns.ns_entrydate,ns.ns_status, ns.ns_name, ns.ns_adresse,
> ns.ns_location FROM noteservice ns WHERE (ns.ns_entrydate='%s/%s/%s' %
> (sentrydate[6:],sentrydate[3:5],sentrydate[:2])) ORDER BY ns.ns_entrydate
> desc')"  size=10 start=query_start>
>
>
> Where i can find infos about sql calls with dtml-in?

try something like

<dtml-let SQLStatement="'SELECT
 ns.ns_ref,ns.ns_entrydate,ns.ns_status, ns.ns_name, ns.ns_adresse,
 ns.ns_location FROM noteservice ns WHERE (ns.ns_entrydate=\'%s/%s/%s\' )
ORDER BY ns.ns_entrydate desc'  %
(sentrydate[6:],sentrydate[3:5],sentrydate[:2])">

<dtml-in "GenericSQL(SQLStatement)>
....


Dont forget about ESCAPE character: \
'.... \'%s%s%s%s\`...'

PM



_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
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 )

Reply via email to