[Zope] ZSQL: UPdating a db entry with data from a query
Gitte Wange
gitte@mmmanager.org
05 Apr 2001 16:44:38 +0200
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
************************