[Zope] ZSQL: UPdating a db entry with data from a query
Phil Harris
phil.harris@zope.co.uk
Thu, 5 Apr 2001 15:52:40 +0100
Try <dtml-var "_['id']"> rather than <dtml-var id>
hth
----- Original Message -----
From: "Gitte Wange" <gitte@mmmanager.org>
To: <zope@zope.org>
Sent: Thursday, April 05, 2001 3:44 PM
Subject: [Zope] ZSQL: UPdating a db entry with data from a query
> Hello,
>
> I need to update a entry in my database with a rownumber minus one
>
> Okay I do this:
> <dtml-in FindTheRecord>
> <dtml-call UpdateTheRecord>
> </dtml-in>
>
> Now the FindTheRecord returns a record with a unique id-field. So I use
> this field to update the record with but gets this error:
> Error Type: Bad Request
> Error Value: ['id']
>
> My sql for the methods looks like this:
> FindTheRecord:
> arguments: ordernum
> SELECT * FROM playlistclips WHERE ordernum=<dtml-var ordernum>-1
> This one works in test
>
> Update the record:
> arguments: ordernum id (these are taken from the above query and are
> fields in the above query-table)
> UPDATE playlistclips SET ordernum=<dtml-var ordernum>+1 WHERE
> id=<dtml-var id>
>
> Now I don't see what's wrong in doing this but Zope is :-)
>
> Regards,
> --
> ************************
> Gitte Wange Jensen
>
> System Squid Developer
> MMManager Aps
> +45 29 72 79 72
>
> gitte@mmmanager.org
> ************************
>
>
> _______________________________________________
> 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 )