version 1.71, 2005/11/08 13:37:32
|
version 1.74, 2005/11/23 17:41:28
|
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 202 class ZSQLExtendFolder(Folder,Persistent
|
Line 202 class ZSQLExtendFolder(Folder,Persistent
|
def formatAscii(self,str,url=None): |
def formatAscii(self,str,url=None): |
"""ersetze ascii umbrueche durch <br>""" |
"""ersetze ascii umbrueche durch <br>""" |
#url=None |
#url=None |
|
str=str.rstrip().lstrip() |
|
|
if url and str: |
if url and str: |
|
|
retStr="" |
retStr="" |
Line 353 class ZSQLExtendFolder(Folder,Persistent
|
Line 355 class ZSQLExtendFolder(Folder,Persistent
|
if start: |
if start: |
if start==' ': |
if start==' ': |
start='' |
start='' |
|
|
if not startValue: |
if not startValue: |
startValue=start |
startValue=start |
|
|
Line 377 class ZSQLExtendFolder(Folder,Persistent
|
Line 380 class ZSQLExtendFolder(Folder,Persistent
|
qs=[] |
qs=[] |
if storename: |
if storename: |
"""store""" |
"""store""" |
|
storename=storename |
else: |
else: |
storename="foundCount" |
storename="foundCount" |
|
|
Line 812 class ZSQLExtendFolder(Folder,Persistent
|
Line 816 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 918 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 952 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 1035 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 |
#print "IAMHERE again:", query |
#print "IAMHERE again:", query |
|
|
if storename and (not NoQuery): |
if storename and (not NoQuery): |
|
|
query2="SELECT count(*) FROM %s %s"%(table,where) |
query2="SELECT count(*) FROM %s %s"%(table,where) |
|
|
#print "QUERYSTRING:",self.REQUEST.SESSION[storename]['queryString2'] |
#print "QUERYSTRING:",self.REQUEST.SESSION[storename]['queryString2'] |