[Zope] Pointer to ZSQL Method using the UPDATE call
Ed Leafe
ed@leafe.com
Thu, 1 Aug 2002 16:37:15 -0400
On Thursday, August 1, 2002, at 03:27 PM, McDonnell, Larry wrote:
> I have been poking around to try to find the proper syntax to do an
> UPDATE
> within and ZSQL Method. I will need to update several fields within the
> call. I tried using the following:
>
> update field_service_log
> set <dtmlsql-var caller_name type="string">
> where <dtml-var service_log_num = service_log_num>
>
> It will save but produce an error. TIA
You might want to check out the patch to SQLgroup made by Andy
Dustman. I posted a similar question a couple of weeks ago, and got this
reply: http://groups.yahoo.com/group/zope/message/94058.
I've installed the two patch files (but not SQLBlender itself), and
it's working flawlessly. I now have ZSQL methods for updating that look
like:
update reg
<dtml-sqlgroup set noparens>
<dtml-sqltest iplayerid type="int" op="eq">
<dtml-comma>
<dtml-sqltest ilastteamid type="int" op="eq" optional>
<dtml-comma>
<dtml-sqltest clastteamtype type="string" op="eq" optional>
<dtml-comma>
<dtml-sqltest cotherdesc type="string" op="eq" optional>
<dtml-comma>
<dtml-sqltest itryoutage type="int" op="eq">
<dtml-comma>
<dtml-sqltest cpostip type="string" op="eq">
</dtml-sqlgroup>
where iid = <dtml-sqlvar iid type="int">
___/
/
__/
/
____/
Ed Leafe
http://leafe.com/
http://foxcentral.net