Pointer to ZSQL Method using the UPDATE call
Hi, 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 Larry McDonnell Proton Energy Systems 50 Inwood Rd. Rocky Hill, CT 06067 (860) 571-6533 ext. 531 Email:lmcdonnell@protonenergy.com www.protonenergy.com
I'm guessing that what you really mean is something like: update field_service_log set caller_name = <dtmlsql-var caller_name type="string"> where service_log_num = <dtml-var service_log_num> you have to specify the database fields to be updated (and compared in the where statement) outside of the <dtml-var>. Charlie
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
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
participants (3)
-
Charles Fulton -
Ed Leafe -
McDonnell, Larry