updateing fields with a icromenting value
is it possible to set a field to incrementing value?
if you look at the result below i have a ord (order) column witch i use to order my items with. when items are removed or i moved around i need a way of updating the ord value so that it goes up in order 0,1,2,3,4 and dose not skip values. i have done this before with PHP by fetching a result then looping thought it building an UPDATE statement and executing it. is there a way of doing this with SQL?
SELECT ord, name_raw FROM cat WHERE parent_id = 2 ORDER BY ord ASC;
8 cuff links
i want to turn the above into:
5 cuff links
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)