Answer the question
In order to leave comments, you need to log in
How to properly organize relationships between tables in PostgreSQL?
There is a table with tracks, and a table with artists.
One track can have multiple artists.
I had two ideas:
1) In the table with the track, make a column with an array in which there will be id artists.
2) Make a separate table with three fields: id, track_id,
artist_id
Answer the question
In order to leave comments, you need to log in
You increment the value of the countFieldValue variable inside the changeCount function, but you don't change the value of value in the DOM. I added a render function that will update the value on click. It is better of course to do it right inside the handlers.
function render() {
countField.value = countFieldValue;
}
countMinus.addEventListener('click', function() {
countFieldValue--;
render()
});
countPlus.addEventListener('click', function() {
countFieldValue++;
render()
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question