How to check for duplicate usernames?

Björnke von Gierke bvg at mac.com
Thu Aug 4 11:54:59 EDT 2011


On 4 Aug 2011, at 17:42, Admin wrote:

> "SELECT UserName FROM UserValidation" into theUN

This query returns all entries in the _column_ username. Later you check if that is _equal_ to the entered password. That makes no sense. either use a query that looks specifically for the entered name (watch out for sql injects), or use "is within", "is among", "contains", or a repeat loop (watch out for wholeMatches). An example query could be:

"SELECT UserName FROM UserValidation WHERE UserName is" && enteredUserName into theSQL


-- 
Watch live presentations every Saturday:
http://livecode.tv

Use an alternative Dictionary viewer:
http://bjoernke.com/bvgdocu/

Chat with other RunRev developers:
http://bjoernke.com/chatrev/





More information about the use-livecode mailing list