I dont know what database youre using, but if I where you i would turn
around that query definition, so the optimizer can do its work + maby fix
problems like the one youre meeting...

if you try $username like $1 you are more likely to get a match, AND speed
:)

Another thing you can try is run the same query in a query tool and see if
the database will return the same result youre getting.

Note: like without % is optimized as = in some databases.

-Klaus

-----Opprinnelig melding-----
Fra: Edmund Cheung [mailto:[EMAIL PROTECTED]]
Sendt: 24. november 2000 13:26
Til: Orion-Interest
Emne: do you know why ?


Hi,

I defined <finder-method query="$1 like $username"> in the orion-ejb-jar.xml
and the username is "alan%" and return no record. But if I just use "alan"
without %, it works. Do you know why ?

Thanks,

Edmund



Reply via email to