Perhaps I'm being a bit slow today. I don't see (or maybe I haven't found the magic syntax) that would allow a table index to handle the re-sequencing of information.
On Sun, 1 Jun 2003 14:09:15 -0400, Martin Gainty wrote: > let the DB manage the sequencing before and after Make Chart # an Index > Martin > ----- Original Message ----- > From: "Don Read" <[EMAIL PROTECTED]> > To: "Daniel Crompton" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Sunday, June 01, 2003 1:54 PM > Subject: RE: Advice on improving our current method > > >> >> On 01-Jun-2003 Daniel Crompton wrote: >> <snip> >> >>> >>> If for example we move song number 5 up to number 1, we then have to >>> manually change the >>> ' Chart Number' of all the ones below it, i.e. changing the old number >>> 1 to a number 2, >>> number 2 to a number 3, number 4 to a number 5 etc. >>> >>> Ideally we need to keep using mysqlcc because it is very simple to use, >>> but it is very time consuming. >>> >>> Any suggestions? >>> >>> >> >> SET @rank:=5; >> >> UPDATE music SET chart=0 WHERE [EMAIL PROTECTED]; >> UPDATE music SET chart=chart+1 WHERE chart<@rank; >> >> Regards, >> -- >> Don Read [EMAIL PROTECTED] >> -- It's always darkest before the dawn. So if you are going to >> steal the neighbor's newspaper, that's the time to do it. >> (53kr33t w0rdz: sql table query) >> >> >> -- >> MySQL General Mailing List >> For list archives: http://lists.mysql.com/mysql >> To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] >> >> > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] --- Listserv only address. Jeff Shapiro -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]