Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    May 2005
    Posts
    224
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Alert user if data inserted is not unique

    I know there's the way to do this to check if the data was inserted, but my form is set up like this:

    Enter 2 fields of info
    submit
    enter more info
    submit + enter into mysql

    I want to know if I can check for uniqueness after the first submit, so that if the data is unique, it won't be stored until after they enter more info.

    Would I have to do some kind of workaround where I attempt to insert it, but if it doesn't get inserted, I delete it and produce an error for them to see?

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    How bout a SELECT query using the entered data, if the query returns something then you know the data's not unique.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •