How to check for duplicate usernames?

Bob Sneidar bobs at twft.com
Thu Aug 4 14:34:47 EDT 2011


Sorry didn't read the whole post. revDataFromQuery will return empty if there were no records matching your select statement. Check to see if it is empty. Obviously, if you need it to be unique, and nothing has gone wrong in the past, there will only be one matching record if one already exists and then revDataFromQuery will not return an empty value. 

Again, I like the fact that sqlYoga can return the data as an array instead of a text blob. 

Bob


On Aug 4, 2011, at 10:51 AM, Admin wrote:

> Sorry to sound stupid, but after the select statement, how do I
> then count for how many records got returned? 
> 
> Here's the select
> statement you wrote with my variable: 
> 
> put "select username from
> uservalidation where username = " &SQ &UN &SQ into CountUN
> --count how
> many records got returned. If greater than 0 you have a duplicate.
> 
> 
> SQ's are single quotes and CountUN is the new variable





More information about the Use-livecode mailing list