version 1.76, 2005/12/22 20:33:11
|
version 1.87, 2006/07/27 17:31:50
|
Line 432 class ZSQLExtendFolder(Folder,Persistent
|
Line 432 class ZSQLExtendFolder(Folder,Persistent
|
return self.ZSQLSimpleSearch(query) |
return self.ZSQLSimpleSearch(query) |
|
|
|
|
|
def ZSQLResetConnection(self): |
|
"""reset the connectione""" |
|
try: |
|
self.getConnectionObj().manage_close_connection() |
|
except: |
|
zLOG.LOG("ZSQLResetConnection",zLOG.ERROR, '%s %s'%sys.exc_info()[:2]) |
|
try: |
|
self.getConnectionObj().manage_open_connection() |
|
except: |
|
zLOG.LOG("ZSQLResetConnection",zLOG.ERROR, '%s %s'%sys.exc_info()[:2]) |
|
|
def ZSQLSimpleSearch(self,query=None,max_rows=1000000): |
def ZSQLSimpleSearch(self,query=None,max_rows=1000000): |
"""simple search""" |
"""simple search""" |
|
|
Line 556 class ZSQLExtendFolder(Folder,Persistent
|
Line 567 class ZSQLExtendFolder(Folder,Persistent
|
qs_temp=[] |
qs_temp=[] |
if USE_FORM or RESPONSE: |
if USE_FORM or RESPONSE: |
for a in self.REQUEST.form.keys(): |
for a in self.REQUEST.form.keys(): |
|
|
qs_temp.append(a+"="+urllib.quote(str(self.REQUEST.form[a]))) |
qs_temp.append(a+"="+urllib.quote(str(self.REQUEST.form[a]))) |
|
|
|
|
Line 586 class ZSQLExtendFolder(Folder,Persistent
|
Line 598 class ZSQLExtendFolder(Folder,Persistent
|
identify=identify.split("=")[0]+"="+sql_quote(identify.split("=")[1]) |
identify=identify.split("=")[0]+"="+sql_quote(identify.split("=")[1]) |
elif name=="-format": |
elif name=="-format": |
format=urllib.unquote(value) |
format=urllib.unquote(value) |
elif (not (name[0]=="-" or name[0]=="_")) and (not len(value)==0): |
#elif (not (name[0]=="-" or name[0]=="_")) and (not len(value)==0): |
|
elif (not (name[0]=="-" or name[0]=="_")): |
|
|
changeList.append("\""+name+"\"="+sql_quote(urllib.unquote(value))) |
changeList.append("\""+name+"\"="+sql_quote(urllib.unquote(value))) |
|
|
changeString=string.join(changeList,",") |
changeString=string.join(changeList,",") |
|
|
queryString="UPDATE %s SET %s WHERE %s"%(table,changeString,identify) |
queryString="UPDATE %s SET %s WHERE %s"%(table,changeString,identify) |
|
zLOG.LOG("ZSQLExtend",zLOG.INFO,"CHANGE: "+queryString) |
|
|
self.ZSQLSimpleSearch(queryString) |
self.ZSQLSimpleSearch(queryString) |
|
|