572 |
if entry._bound and entry.isQueryable() and len(str(val)): |
if entry._bound and entry.isQueryable() and len(str(val)): |
573 |
if entry.typecast == 'text': |
if entry.typecast == 'text': |
574 |
if block._convertAstericksToPercent: |
if block._convertAstericksToPercent: |
575 |
|
print val |
576 |
try: |
try: |
577 |
val = val.replace('*','%') |
val = str(val).replace('*','%') |
578 |
except ValueError: |
except ValueError: |
579 |
pass |
pass |
580 |
print val |
print val, val.find('%'), val.find('_') |
581 |
## GDebug.printMesg(5,'Adding conditional LIKE (%s like %s)' % (entry.field, val)) |
if (val.find('%') >= 0 or val.find('_') >= 0): |
582 |
conditionLike[entry.field] = val |
conditionLike[entry.field] = val |
583 |
|
else: |
584 |
|
conditionEq[entry.field] = val |
585 |
else: |
else: |
586 |
## GDebug.printMesg(5,'Adding conditional AND (%s=%s)' % (entry.field, val)) |
## GDebug.printMesg(5,'Adding conditional AND (%s=%s)' % (entry.field, val)) |
587 |
conditionEq[entry.field] = val |
conditionEq[entry.field] = val |