Hello everyone. I'm a noob to MySql, so I'm hoping this is easy and I apologise in advance if I've got the terminology all wrong; I've searched the forum but couldn't find an answer.
I have a Joomla database with a lot of imported data from various sources. The table 'jos_content' has an indexing column 'ordering' (distinct from the primary auto incrementing index 'id') which affects how rows are ordered in the admin backend of Joomla.
I need to order 'jos_content' by the date column 'created' while incrementing 'ordering' starting with a value of '1' (being the most recent date 11 Feb 08) through almost 2000 rows of data to the earliest date (01/01/2007). I also need to run this past another column 'catid' so that only the rows with a unique 'catid' are affected.
I understand basic sorting, by using UPDATE, ORDER BY and WHERE but have no idea how to automatically increment the data in the column 'ordering' and to do it across 2000 rows.
And to complicate matters (?) I'm using phpMyAdmin.
I hope that makes sense and look forward your thoughts.
Cheers,
ROBERT
I have a Joomla database with a lot of imported data from various sources. The table 'jos_content' has an indexing column 'ordering' (distinct from the primary auto incrementing index 'id') which affects how rows are ordered in the admin backend of Joomla.
I need to order 'jos_content' by the date column 'created' while incrementing 'ordering' starting with a value of '1' (being the most recent date 11 Feb 08) through almost 2000 rows of data to the earliest date (01/01/2007). I also need to run this past another column 'catid' so that only the rows with a unique 'catid' are affected.
I understand basic sorting, by using UPDATE, ORDER BY and WHERE but have no idea how to automatically increment the data in the column 'ordering' and to do it across 2000 rows.
And to complicate matters (?) I'm using phpMyAdmin.
I hope that makes sense and look forward your thoughts.
Cheers,
ROBERT
Comment