Is it save to delete the value stored in dragSortOrder?

2 posts by 2 authors in: Forums > CMS Builder
Last Post: June 13, 2023   (RSS)

By JeffC - June 13, 2023

I have a section editor where the Sorting is set as dragSortOrder DESC

I would like to sort the records by Product ID to get them into an approximate correct order, and then change the Sorting to dragSortOrder Desc to fine-tune.

Would this work…

Use MySQL plugin to remove the existing values in dragSortOrder: INSERT INTO cmsb_products SET dragSortOrder = '';

Then change Sorting to product_ID DESC to get all my products listed from highest product id to lowest.

Then change Sorting to dragSortOrder DESC 

Thanks

Jeff

Jeff

By Dave - June 13, 2023

Hi Jeff, 

If you are comfortable with MySQL queries you can also try just setting dragSortOrder to the value of product_ID like this:

UPDATE cmsb_products SET dragSortOrder = product_ID;

Or if you need to sort in the reverse order you can minus from a number you're sure is greater than the highest product_ID

UPDATE cmsb_products SET dragSortOrder = 10000 - product_ID;

Let me know if that works for you!

Dave Edis - Senior Developer
interactivetools.com