[ic] Query problem

Paul Jordan interchange-users@icdevgroup.org
Wed May 21 16:08:00 2003


> 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]
> ---------------
> 

try:

[query 
	type=list 
	table="userdb"
	sp="@@MV_PAGE@@"
	ml=9999
	sql=|
		SELECT email 
		FROM   userdb 
		WHERE  email = '[cgi email]'
	|]

and also, filter that cgi value.

Paul