Git Product home page Git Product logo

Comments (4)

Durafen avatar Durafen commented on August 10, 2024

This happens because column fromgame in table crossrecs defined as primary key, so only one entry can be suggested for every game.
I tried setting created as a primary key for example, the suggestions function is back to work as intended.

from ifdb-suggestion-tracker.

lkcampbell avatar lkcampbell commented on August 10, 2024

@Durafen, what about putting a new id column in the table as the primary key and remove fromgame as a primary key? id seems to be the default primary key column name. Or maybe it doesn't even need a primary key?

from ifdb-suggestion-tracker.

Durafen avatar Durafen commented on August 10, 2024

Both of this options will work.
Removing the unique primary index is the easier way (no need for coding, only table altering).

from ifdb-suggestion-tracker.

Durafen avatar Durafen commented on August 10, 2024

It's better to have a unique key, so another simple option may be to set created as primary unique key.

MariaDB [ifdb]> DESCRIBE crossrecs;
+----------+-------------+------+-----+---------+-------+
| Field    | Type        | Null | Key | Default | Extra |
+----------+-------------+------+-----+---------+-------+
| fromgame | varchar(32) | NO   | PRI | NULL    |       |
| togame   | varchar(32) | NO   |     | NULL    |       |
| userid   | varchar(32) | NO   | MUL | NULL    |       |
| notes    | mediumtext  | YES  |     | NULL    |       |
| created  | datetime    | NO   |     | NULL    |       |
+----------+-------------+------+-----+---------+-------+

@dfabulich Opinion? Which way is going to be more suitable?

from ifdb-suggestion-tracker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.