Hello. There are characteristics that are taken from 3 (three) tables. When outputting it looks like this:

ПРОЦЕССОР Производитель - intel Количество ядер - 4 Назначение - для ноутбука

And let's say I forgot to add the частота процессора . If I add it now, it will be the last one, that is, it wakes up after the назначение .

But actually the question itself. It is necessary to create a field in the table in which it would be possible to indicate after which parameter to insert a new parameter. How to do it right?

  • These are display problems on the client, and they have nothing to do with data storage. - Akina
  • Well, yes ... In the open-card and prestape they don’t have to add the sort_order field - Alex_01

1 answer 1

Add the sort4 field of type int characteristics table. Specify an arbitrary order in this field, then sort it in the query. Do not forget to add an index field.

  • Arbitrary order is like? - Alex_01
  • examples of arbitrary orders: 1,2,3,4 4,3,2,1 2,1,3,4 - Eugene Bartosh
  • No, this is a joke. His auto increment to do something? - Alex_01
  • that's nice, since this is understood the rest is nonsense ;-) - Eugene Bartosh
  • No - if the order is arbitrary then it is set manually when entering data, in other words it is the sequence number of the property - Eugene Bartosh