[ic] Query problem

Jamie Neil interchange-users@icdevgroup.org
Wed May 21 15:20:01 2003


Can anyone explain why this code snipit doesn't work?

The query only seems to return a match on the first record in the table, so
if the email address matches on another record, no matches are returned.

---------------
Checking posted values...
[tmp failed_tests][/tmp]
[query type=list sql="select email from userdb where email = '[cgi email]'"]
[list][sql-code][/list]
[on-match]
        Failed<br><br>
        Error: Duplicate email address found in database<br><br>
        [tmp failed_tests]1[/tmp]
[/on-match]
[no-match]
        ok<br><br>
        [value name=email set="[cgi email]" hide=1]
[/no-match]
[/query]
---------------

Another thing I noted is that if the [list][/list] is missing then
[no-match] is always skipped, and if type=list is missing, the query just
doesn't work!

I'm sure it's an obvious one, but I just can't see it. Can anyone shed any
light?...

Jamie Neil
Versado I.T. Services Ltd.