msaz87 Posted August 10, 2009 Share Posted August 10, 2009 Hey all, I was hoping to get a little guidance on something I'm trying to do... I use FormTools (formtools.org) to manage a league registration, but what I'd like to find a way to do is add something before completion of the form that would query the database's table for duplicates. Basically, if someone registered a team named "Boys" and another person came along and tried to register with the same team name, it would reply "team name already taken" and the form submission wouldn't complete. There's some documentation on the script's site regarding validation... but the querying stuff is foreign to me. Any help or guidance is greatly appreciated -- thanks! Quote Link to comment https://forums.phpfreaks.com/topic/169579-form-queries-database-for-duplicates-prior-to-completion/ Share on other sites More sharing options...
fenway Posted August 10, 2009 Share Posted August 10, 2009 Does it not have something like that built-in? Otherwise, you simply need to issue a simply query and count the number of matching rows for a given team name -- if it's > 0, then you have a dupe. Quote Link to comment https://forums.phpfreaks.com/topic/169579-form-queries-database-for-duplicates-prior-to-completion/#findComment-894783 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.