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]