Page 1 of 1

songs table - sequence of fields

Posted: Sun Apr 05, 2015 5:17 pm
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?

Re: songs table - sequence of fields

Posted: Wed Apr 29, 2015 2:09 pm
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.

Re: songs table - sequence of fields

Posted: Tue May 05, 2015 6:58 am
by wolfram.brod
Thanks for that tip - I will try it next
W.B.