songs table - sequence of fields

This forum is for questions / discussions regarding development of addons / tweaks for MediaMonkey for Windows 4.

Moderators: Gurus, Addon Administrators

wolfram.brod
Posts: 28
Joined: Tue Feb 24, 2009 7:43 am

songs table - sequence of fields

Post by wolfram.brod »

I'm writing a script to get some information out of the songs table, but it's a bit confusing. This is the code:
ff = "SELECT * FROM Songs where ID=" & f1
set song = MM.Database.OpenSQL(ff)
for x = 0 to 99
text = song.stringbyindex(x)
next x
The values I get for x=0 to 6 are correct. However: the song title, which ist in the description shown as field no.7 is shown with x=11. The song path is shown with x=12, but with x=13 I get "mp3", which is defenitely not the year!! And so on.

Where my I get a description of the songs table with the field-explanation in the correct sequence?
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: songs table - sequence of fields

Post by trixmoto »

Have you tried using the SQL Viewer script to build and test your query? I seem to remember that this brings back column headings, which you might find useful.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
wolfram.brod
Posts: 28
Joined: Tue Feb 24, 2009 7:43 am

Re: songs table - sequence of fields

Post by wolfram.brod »

Thanks for that tip - I will try it next
W.B.
Post Reply