Hi ,<br><br>I am working on this JJ,    185397        wis      NOR      Linu      amarok-bugs-dist kde org      NEW            JJ: Saved playlist default name could be smarter <br>In the SqlPlaylist:: savetoDb(bool tracks) <br>
<br>I have added the below code to check for unique playlist names but every time i run this query , the value.IsEmpty is always zero. I dont understand what is wrong with the code .<br><br>SqlStorage *sql = CollectionManager::instance()-&gt;sqlStorage();<br>
    QString sqlQuery = &quot;SELECT playlist_id from playlists WHERE name=&#39;%1&#39;&quot;;<br>        sqlQuery = sqlQuery.arg( sql-&gt;escape( m_name ) );<br>    QStringList value = sql-&gt;query( sqlQuery );<br>    if ( !value.isEmpty() )<br>
       m_name = m_name + KGlobal::locale()-&gt;formatDateTime( QDateTime::currentDateTime(), KLocale::LongDate, true );<br><br>~Chinmaya<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Chinmaya Padhi</b> <span dir="ltr">&lt;<a href="mailto:padhi.chinmaya@gmail.com">padhi.chinmaya@gmail.com</a>&gt;</span><br>
Date: Sun, Oct 10, 2010 at 10:01 PM<br>Subject: Re: Amarok ... was Re: Junior Jobs<br>To: Stefan Derkits &lt;<a href="mailto:stefan@derkits.at">stefan@derkits.at</a>&gt;<br><br><br>HI ,<br>
<br>
I have implemented the changes for the saving the playlist in the db. But there was no info about this usecase:<br>
<br>
Lets say we have an album with artist named Amarok. We save it. Then 
again some other album for the artist amarok , in that case multiple 
playlist with <br>
the same will create confusion. So i am appending the time stamp incase the playlist name already exists.<br>
<br>
Let me try with your approach.<br>
<br>
Thanks for the inputs :)<br><font color="#888888">
~Chinmaya</font><div><div></div><div class="h5"><br><br><div class="gmail_quote">On Sun, Oct 10, 2010 at 5:34 PM, Stefan Derkits <span dir="ltr">&lt;<a href="mailto:stefan@derkits.at" target="_blank">stefan@derkits.at</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
Hey,<br>
<br>
did you already solve your Problem from today morning (well it was<br>
morning in my Timezone ;) ) about the SQL Query?<br>
I think it could have to do with the SQL count(*) ... I think that only<br>
works if you use Group by or something.<br>
Try to do &quot;select playlistid&quot; or something, instead of &quot;select count(*)&quot;<br>
and see if your problem that you don&#39;t find something with existing<br>
playlistnames continues to be there.<br>
<br>
Stefan<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.10 (GNU/Linux)<br>
<br>
iEYEARECAAYFAkyxq9gACgkQlZvAMV/NgGJWbACfSyVV9c12EwCXNTDj4DzxaZ2i<br>
QR8An1VkWP3zdT3WTZN/wBaTKtZpednG<br>
=m+7Q<br>
-----END PGP SIGNATURE-----<br>
</blockquote></div><br>
</div></div></div><br>