Replies: 1 comment 2 replies
-
Hi @xDoogie!
In itself, I don't think the project is too complex. However, interfacing it with mySQL the right way (with multiple tables, primary keys, foreign keys, etc.) could be biting off more than you can chew. At the risk of giving up your project 😅 I would give you the following options: Option 1 (preferred)If you really want to stick with your mySQL database (I can understand that), then you could do something simple: have a single tournament table with (at least) 2 columns.
You would have to use the following storage implementation: https://www.npmjs.com/package/brackets-memory-db Do you want to edit a match? Then you can do the following:
Note: this is NOT a good practice, but as a beginner it's totally OK to start like this. Option 2I don't think it's a good idea, but you could also just store the JSON data in a JSON file. You would use this storage implementation: https://www.npmjs.com/package/brackets-json-db Option 3 (can be too hard)Totally embrace SQL and go the "multiple tables way". I think some people did it, and you can find some information here: #111 Option 4 (unreasonable)Change database and go NoSQL. Don't be afraid to ask more details 😉 |
Beta Was this translation helpful? Give feedback.
-
Hi Drarig29, hope you are well. I'm brand new to coding and still have a lot to learn so forgive my basic questions. As one of my first projects I wanted to create a simple site for my group of friends where we can create a tournament and then track results. I have the creation bit done where host specifies the Name, Nr of teams, Nr of Games each teams has to play against one another and which mode: single or double elimination. Once created my friends can click on a link and add their teams to that tournament. All that information is stored in mySQL. Now what I was thinking about is, when the time of the tournament is up, the host presses Start tournament, and with that, the bracket structure is generated. My question is: is your project too complex for such basic project and need ? :) I have been looking for some ideas and came across it, but not sure how to implement it in a basic php / javascript code. ANy tips ? Thank you for any feedback. Have a great day.
Beta Was this translation helpful? Give feedback.
All reactions