PDA

View Full Version : SQL Dax export help pls



kazgor
10-26-2006, 10:28 AM
Hi,

I want to be able to create a SQL import file and need a little help with doing the DAX command line.

Basically im going to use a script that designed to be for Movies so there no SQL table for each Album track, but there is a DESCRIPTION field so there request is:-

1. loop through each album.
2. Export the album name, date added, release date, label, complete track list, album art

Now what i need doing in the COMPLETE TRACK LIST is for the DAX script to loop through all the tracks for that album and join them together into a single variable each track having a | between them so i can replace this with CR/LF in the PHP script.

eg it would be something like

TRACK LISTING ||01. Skies the Limit 3:46 |02. Love is Dangerous 3:18 |03. In The Back of my Mind 7:02 |04. Do you know 4:19 |05. Save me 4:15 |06. Affairs of the Heart 4:22 |07. When The Sun goes down 3:18 |08. Behind the Mask 4:18 |09. Stand on The Rock 4:01 |10. Hard Feelings 4:53 |11. Freedom 4:12 |12. When it comes to Love 4:08 |13. The second time 2:31 |'

I would have to think of how to make certain field stand out eg CD1. CD2 etc but for now just the basic things first.

ta :)

andrei_c
10-26-2006, 08:42 PM
Try this code to output the tracks data:



TRACK LISTING &#124;&#124;<dax:volume><dax:track><dax:tracknum/>. <dax:title/> <dax:tracktime/> &#124;</dax:track></dax:volume>


I didn't verify that it works, so please post if there is any problem.

Andrei