I think this is a database query rather than a coding one. So I have a table which lists product names and other assorted details. On my site I have a page which simply lists each product in a table row. Now I have initially setup the table to auto-increment on the productID field and then on the products page the output is simply ordered by this productID field.
It now turns out that the ordering of the products needs to be specified by the site owner. So imagine there are 20 products listed now and in a months time we add product 21 but this needs to be displayed between say products 5 and 6.
I have one vague kludge of an idea of how to achieve this but wondered if anyone has a simple solution. My kludge would be to add another field (call it 'weighting') which initially had values 10, 20, 30 etc for row 1, 2, 3 respectively. Then when product 21 was added it would be given value of 55 (using the above example) in the weighting field.