MySQL Forums
Forum List  »  Italian

Re: File sparsi da organizzare
Posted by: Michele Abbondanza
Date: September 17, 2008 04:11AM

premesso che settando il campo order ad 1 per tutti metti non solo la canzone all'interno di tutte le playlist degli utenti, ma la metti in prima posizione,senza passare tanto per excel o altre cose io farei così:

INSERT INTO `Playlist` (`Song`,`id`,`order`) SELECT '7',nomeCampoIDUtenti,'1' FROM `Lista_Utenti` order by nomeCampoIDUtenti

facendo questo però come detto prima metti per tutti gli utenti la song 7 al posto 1 in playlist, se vuoi metterla in coda alla playlist ti tocca fare una piccola procedura.



Edited 1 time(s). Last edit at 09/17/2008 04:14AM by Michele Abbondanza.

Options: ReplyQuote


Subject
Views
Written By
Posted
4116
September 07, 2008 04:30AM
Re: File sparsi da organizzare
2700
September 17, 2008 04:11AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.