--- ZSQLExtend/ZSQLExtend.py 2008/06/19 11:46:29 1.127 +++ ZSQLExtend/ZSQLExtend.py 2009/09/30 15:29:14 1.131 @@ -423,6 +423,7 @@ class ZSQLExtendFolder(Folder,Persistent # set up logging to response as plain text RESPONSE.setHeader("Content-Type","text/plain; charset=utf-8") RESPONSE.write("Import FMPXML file...\n\n") + RESPONSE.flush() loghandler = logging.StreamHandler(RESPONSE) if debug: loghandler.setLevel(logging.DEBUG) @@ -1136,7 +1137,10 @@ class ZSQLExtendFolder(Folder,Persistent table=urllib.unquote(value) elif name=="-identify": identify=urllib.unquote(value) - identify="lower("+identify.split("=")[0]+")="+sql_quote(identify.split("=")[1].lower()) + # old code did identify with lower() which doesn't work for oids + #identify="lower("+identify.split("=")[0]+")="+sql_quote(identify.split("=")[1].lower()) + (k,v) = identify.split("=") + identify="%s=%s"%(k,sql_quote(v)) elif name=="-format": format=urllib.unquote(value) #elif (not (name[0]=="-" or name[0]=="_")) and (not len(value)==0): @@ -1502,7 +1506,7 @@ class ZSQLExtendFolder(Folder,Persistent elif op=="numerical": term=analyseIntSearch(value) - tmp=(name+" "+term) + tmp=(namealt+" "+term) # take namealt without LOWER elif op=="grep": tmp=(name+" ~* "+sql_quote(value)) elif op=="one": @@ -1552,7 +1556,7 @@ class ZSQLExtendFolder(Folder,Persistent elif op=="numerical": term=analyseIntSearch(value) - tmp=(name+" "+term) + tmp=(namealt+" "+term) # take namealt without LOWER elif op=="grep": tmp=(name+" ~* "+sql_quote(value)) elif op=="one":