D
D
DoubleWish2015-12-31 15:28:14
PHP
DoubleWish, 2015-12-31 15:28:14

How to implement cell dependency on two variables in mysql?

There is a certain database that can be edited and the type of output on the site is similar to an exel table. But it is not clear how to make the dependence and storage of data in the database so that the price (id_price) depends on what date it is (top) and on what type it belongs to (left)
61dfeca4b77f4ce590b80b1e4425b686.jpg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Arman, 2015-12-31
@Arik

We need to make one more table, a table of links with fields: id_type, id_date, id_price. According to this table, using JOINs, you can make a final table.
Another option is to add link fields to existing tables, but I would use the first option

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question