Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

244
Visualizações
Avoid dupliacte entries in MySQL table with auto suggestions

I'm working on a system, where authenticated users can suggest ideas, what to do next...

To be more precise, users can suggest activites, which are then entered into the MySQL database. Then, all users can see those activites and can vote for the ones, they like the most.

The problem is: I always have to think about the laziest users, that just enter something new, without checking, if this entry (or something similar) already exists...

The point is: say its about gaming, then in the end, I might have

  • Zelda
  • Zelda: Breath of the Wild
  • Zelda Breath of the Wild
  • Zelda BOTW
  • Zelda: BOTW

and propably 5 other alternatives, that I forgot about.

And no, I can't just compare it to a game library and insert the full names, as games would only be 10% of the hole list. Topics are from every category, so you can't compare it to databases, as I'd say...

What I thought about is: On keydown (when users are entering a new topic), the database is searched for entries and theres something showing saying "did you mean xxxx" and users would be able to click on it to vote for the already existing entry, rather then creating a new one with a more or less similar name.

Even with that way, users COULD still enter new entries though. Of course, I could prevent them from creating the EXACT SAME entry again, but not, if it's a variation.

Anybody has an idea, on how to prevent them from submitting the varieties, rather then taking/voting for an already existing entry?

Again, comparing to a database won't work most propably, as it can be everything from lifestyle, gaming, programming, etc....

about 4 years ago · Santiago Gelvez
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda