RadioDJ - Free Radio Automation Software Forum

CSV Exporter

CSV Exporter
« on: August 10, 2017, 04:50:43 PM »
I utilize the CSV Export plugin quite a bit for quickly exporting some mass database details to an excel spreadsheet.
I am wondering if the "Play counts" field could be added as an exportable field?

Either that, or in Reports, under "Report Mode: Count" if one of the drop-down selections could be "Total Plays".
I know I can currently mess with the settings and get the total number of spins for any track, but the current selections are either "weeks" or "months".. I would like to get one total number of spins for a track over a set amount of time.

Offline radiosoundfm

  • *
  • 11
  • More ways to get the same result
    • Iventi.nu
Re: CSV Exporter
« Reply #1 on: June 18, 2020, 06:54:47 PM »
i do an export with a dos bat file.

Code: [Select]
@echo off
set path=%path$;C:\Program Files\MySQL\MySQL Server 8.0\bin
del "C:\ProgramData\MySQL\MySQL Server 8.0\Uploads\sync_website.txt"
mysql.exe --host=192.168.178.100 --user=databaseuser --password=password --database=radiodj161 < sync_website.sql
copy "C:\ProgramData\MySQL\MySQL Server 8.0\Uploads\sync_website.txt" , "C:\Icecast\web\sync_website.csv"

Code: [Select]
Flush tables;
Flush privileges;
SELECT id , artist ,  title , date(artist_played) , count_played , year , RIGHT(LEFT(SEC_TO_TIME(duration), 8), 5) , bpm , comments FROM songs  WHERE id_subcat = 30
INTO OUTFILE 'C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/sync_website.txt'
      FIELDS ESCAPED BY ''
      TERMINATED BY ',' ENCLOSED BY ''
      LINES TERMINATED BY '\r\n';
exit