|
|
| version 1.71, 2005/11/08 13:37:32 | version 1.72, 2005/11/09 10:47:09 |
|---|---|
| Line 98 class ZSQLExtendFolder(Folder,Persistent | Line 98 class ZSQLExtendFolder(Folder,Persistent |
| """erzeuge index aus feld""" | """erzeuge index aus feld""" |
| index={} | index={} |
| founds=self.ZSQLSimpleSearch("""SELECT %s,oid FROM %s LIMIT 2000"""%(field,table)) | founds=self.ZSQLSimpleSearch("""SELECT %s,oid FROM %s LIMIT 2000"""%(field,table)) |
| print len(founds) | |
| for found in founds: | for found in founds: |
| tmp=getattr(found,field,None) | tmp=getattr(found,field,None) |
| if tmp: | if tmp: |
| Line 812 class ZSQLExtendFolder(Folder,Persistent | Line 812 class ZSQLExtendFolder(Folder,Persistent |
| #check for op | #check for op |
| splitted=qs.split(",") | splitted=qs.split(",") |
| print splitted | |
| if tableExt: | if tableExt: |
| table=tableExt | table=tableExt |
| Line 914 class ZSQLExtendFolder(Folder,Persistent | Line 914 class ZSQLExtendFolder(Folder,Persistent |
| op="ct" | op="ct" |
| namealt=name | namealt=name |
| name="LOWER("+punktsplit[1]+")" | name="LOWER("+punktsplit[1]+")" |
| print "XX",op | |
| if op=="ct": | if op=="ct": |
| tmp=(name+" LIKE "+sql_quote("%"+value+"%")) | tmp=(name+" LIKE "+sql_quote("%"+value+"%")) |
| elif op=="gt": | elif op=="gt": |
| Line 948 class ZSQLExtendFolder(Folder,Persistent | Line 948 class ZSQLExtendFolder(Folder,Persistent |
| op="all" | op="all" |
| print punktsplit | |
| searchTmp="""%s in (select %s from %s where %s)"""%(punktsplit[3],punktsplit[2],punktsplit[0],tmp) | searchTmp="""%s in (select %s from %s where %s)"""%(punktsplit[3],punktsplit[2],punktsplit[0],tmp) |
| print "got",searchTmp | |
| queryTemplate.append(searchTmp) | queryTemplate.append(searchTmp) |
| elif (not name[0]==iCT) and (not len(value)==0): | elif (not name[0]==iCT) and (not len(value)==0): |
| Line 1031 class ZSQLExtendFolder(Folder,Persistent | Line 1031 class ZSQLExtendFolder(Folder,Persistent |
| #print "QE",table | #print "QE",table |
| #print (select,table,where,sort,maxstr,skip) | #print (select,table,where,sort,maxstr,skip) |
| query="SELECT %s FROM %s %s %s %s %s"%(select,table,where,sort,maxstr,skip) | query="SELECT %s FROM %s %s %s %s %s"%(select,table,where,sort,maxstr,skip) |
| print query | |
| if not nostore=="yes": | if not nostore=="yes": |
| self.REQUEST.SESSION['qs']=opfields | self.REQUEST.SESSION['qs']=opfields |