Author Topic: How to bulk delete request entries?  (Read 2285 times)

Yvette - Hitz24

  • Full Member

  • Offline
  • ***
  • 216
  • Personal Text
    The Hits Only Station
    • Hitz24
How to bulk delete request entries?
« on: June 28, 2017, 04:45:34 PM »
Hi Guys,

I am having the following problems with the request plugin:

1. How to mass delete the request entries?
2. How to auto-enable the auto-add feature in the request plugin after a reboot?
3. How to get the latest entries on top of the entry list?

Can anyone help me out?

Yvette

Streaming Hit Music

Jhonny

  • Hero Member

  • Offline
  • *****
  • 4095
  • Personal Text
    Peace, enjoy life, last sleep is longer than live!
    • Jhonny's RadioDJ tutorials.
Re: How to bulk delete request entries?
« Reply #1 on: June 28, 2017, 06:44:11 PM »
Question 1.

clean-requests.sql

Quote
FLUSH requests;

Code: [Select]
DELETE FROM `requests` WHERE `played`=1;
R.T.F.M. means to me, Read The Fantastic Messages.
Einstein says: Make things simple, but don't make simple things simpler! (wise) this is just my life lesson you know.

I don't do drugs, I do tuts. ( ͡° ͜ʖ ͡°) visit  https://radiodj.info

Testing RadioDJ v2.0.3.1 Beta

Jhonny

  • Hero Member

  • Offline
  • *****
  • 4095
  • Personal Text
    Peace, enjoy life, last sleep is longer than live!
    • Jhonny's RadioDJ tutorials.
Re: How to bulk delete request entries?
« Reply #2 on: June 28, 2017, 08:53:57 PM »
Now having a bit more time to explain, on Question 1, also for others who want to use it.
Flush = clear the table played or not.
Delete = only the rows in the table which request is fulfilled.

Copy from the zip the sql file and put it in c:\RadioDJ\Setup\Sql\

Start Database Setup.exe and select the last tab (Database Utils), click on SELECT UPDATE FILE choose the remove-played-requets.sql or the  clean-requests.sql and run it.
If you leave the sql file(s) in the folder you can do this every time.

It is also possible in an event, every Sunday or so, or a manually event with the utility SQLRun 1.0 (Schedule and run SQL queries in RadioDJ)  and the Plugin EventsCart v1.2  shows and start a manuallyl event from Marius.

Explain plugin eventscart here.
SQL run here.

Jhonny

Question 2.
Maybe in the new version.

Question 3.
 Latest entries on top?
Don't think your listeners will like it.
My request on 1:00 pm.
Others on 1:05 pm play in front of my request!
 >:D when that happens. Or em i wrong?

 
R.T.F.M. means to me, Read The Fantastic Messages.
Einstein says: Make things simple, but don't make simple things simpler! (wise) this is just my life lesson you know.

I don't do drugs, I do tuts. ( ͡° ͜ʖ ͡°) visit  https://radiodj.info

Testing RadioDJ v2.0.3.1 Beta

Yvette - Hitz24

  • Full Member

  • Offline
  • ***
  • 216
  • Personal Text
    The Hits Only Station
    • Hitz24
Re: How to bulk delete request entries?
« Reply #3 on: June 29, 2017, 10:26:24 PM »
Ok Jhonny,

Thanks for explaining 1. I will test this over the weekend.

2. Well,  we will just have to wait then.

3. No, I don't mean on top of the playlist, but on top of the entry list. Now we have to scroll down to see the latest entry.

Yvette
Streaming Hit Music

Jhonny

  • Hero Member

  • Offline
  • *****
  • 4095
  • Personal Text
    Peace, enjoy life, last sleep is longer than live!
    • Jhonny's RadioDJ tutorials.
Re: How to bulk delete request entries?
« Reply #4 on: June 30, 2017, 07:54:29 AM »
3. Perhaps in the new version there is a sorting option.
R.T.F.M. means to me, Read The Fantastic Messages.
Einstein says: Make things simple, but don't make simple things simpler! (wise) this is just my life lesson you know.

I don't do drugs, I do tuts. ( ͡° ͜ʖ ͡°) visit  https://radiodj.info

Testing RadioDJ v2.0.3.1 Beta

Yvette - Hitz24

  • Full Member

  • Offline
  • ***
  • 216
  • Personal Text
    The Hits Only Station
    • Hitz24
Re: How to bulk delete request entries?
« Reply #5 on: July 06, 2017, 07:08:46 PM »
Hi Jhonny,

This works like a charm!
My request list is now emty again and I made an event which empties every sunday.
Thanks for helping me out!

Yvette
Streaming Hit Music

PROducer

  • Hero Member

  • Offline
  • *****
  • 582
  • Personal Text
    Long Time Radio Guy
    • The Rooster
Re: How to bulk delete request entries?
« Reply #6 on: August 05, 2017, 01:48:52 AM »
...It is also possible in an event, every Sunday or so, or a manually event with the utility SQLRun 1.0 (Schedule and run SQL queries in RadioDJ)  and the Plugin EventsCart v1.2  shows and start a manuallyl event from Marius.

Explain plugin eventscart here.
SQL run here.
I have managed to get this to work without extra software to install.  You can add a "Track by SQL Query" to a rotation and just have the SQL code in it to clear the request list. I put mine as the first element in my rotation, and when the rotation loads, the first track is the query
Code: [Select]
DELETE FROM `requests` WHERE `played`=1; and clears out the played requests!  Has worked twice for me so far.  Note that the query doesn't return a track, so nothing will show up in the queue, but played requests will disappear from the history.

Yvette - Hitz24

  • Full Member

  • Offline
  • ***
  • 216
  • Personal Text
    The Hits Only Station
    • Hitz24
Re: How to bulk delete request entries?
« Reply #7 on: August 05, 2017, 04:48:44 PM »
Sounds good Jhonny!
Streaming Hit Music

PROducer

  • Hero Member

  • Offline
  • *****
  • 582
  • Personal Text
    Long Time Radio Guy
    • The Rooster
Re: How to bulk delete request entries?
« Reply #8 on: August 16, 2017, 04:50:04 AM »
It is also possible in an event, every Sunday or so, or a manually event with the utility SQLRun 1.0 (Schedule and run SQL queries in RadioDJ)  and the Plugin EventsCart v1.2  shows and start a manuallyl event from Marius.
Jhonny... I tried the SQLRun program in a scheduled event, and I can't get it to clear the played requests from the queue.  If I put it in a Manual Event and hit the Event Cart button for it, it works.

Any thought on why it won't work as a scheduled event?

Jhonny

  • Hero Member

  • Offline
  • *****
  • 4095
  • Personal Text
    Peace, enjoy life, last sleep is longer than live!
    • Jhonny's RadioDJ tutorials.
Re: How to bulk delete request entries?
« Reply #9 on: August 16, 2017, 07:05:30 AM »
No i don't.  :-[
Maybe a typo in the argument field of the event.
R.T.F.M. means to me, Read The Fantastic Messages.
Einstein says: Make things simple, but don't make simple things simpler! (wise) this is just my life lesson you know.

I don't do drugs, I do tuts. ( ͡° ͜ʖ ͡°) visit  https://radiodj.info

Testing RadioDJ v2.0.3.1 Beta

PROducer

  • Hero Member

  • Offline
  • *****
  • 582
  • Personal Text
    Long Time Radio Guy
    • The Rooster
Re: How to bulk delete request entries?
« Reply #10 on: August 16, 2017, 07:49:17 AM »
Nope.  Triple checked, and It works when done manually.

Jhonny

  • Hero Member

  • Offline
  • *****
  • 4095
  • Personal Text
    Peace, enjoy life, last sleep is longer than live!
    • Jhonny's RadioDJ tutorials.
Re: How to bulk delete request entries?
« Reply #11 on: August 16, 2017, 08:10:38 AM »
Give me some time, then I'll do an setup to see if the same thing happens to me.

1. in a manual.
2. in a event.
R.T.F.M. means to me, Read The Fantastic Messages.
Einstein says: Make things simple, but don't make simple things simpler! (wise) this is just my life lesson you know.

I don't do drugs, I do tuts. ( ͡° ͜ʖ ͡°) visit  https://radiodj.info

Testing RadioDJ v2.0.3.1 Beta

Jhonny

  • Hero Member

  • Offline
  • *****
  • 4095
  • Personal Text
    Peace, enjoy life, last sleep is longer than live!
    • Jhonny's RadioDJ tutorials.
Re: How to bulk delete request entries?
« Reply #12 on: August 16, 2017, 09:10:07 AM »
The same thing happened to me  >:D think em used the same events settings.

But it is working when in the arguments field the place where the sql file is will be between " " double quotes.

"c:\RadioDJ test\Setup\Sql\remove-played-requets.sql"

Test it by your self in a event.
R.T.F.M. means to me, Read The Fantastic Messages.
Einstein says: Make things simple, but don't make simple things simpler! (wise) this is just my life lesson you know.

I don't do drugs, I do tuts. ( ͡° ͜ʖ ͡°) visit  https://radiodj.info

Testing RadioDJ v2.0.3.1 Beta

PROducer

  • Hero Member

  • Offline
  • *****
  • 582
  • Personal Text
    Long Time Radio Guy
    • The Rooster
Re: How to bulk delete request entries?
« Reply #13 on: August 16, 2017, 04:44:22 PM »
...But it is working when in the arguments field the place where the sql file is will be between " " double quotes.

"c:\RadioDJ test\Setup\Sql\remove-played-requets.sql"

Test it by your self in a event.

BINGO!  We have it working!   Thanks Jhonny!

 ;D

*There is a .jpg file of a screen grab showing the setup with an event in the .zip that does not include the quotes around the argument.

Jhonny

  • Hero Member

  • Offline
  • *****
  • 4095
  • Personal Text
    Peace, enjoy life, last sleep is longer than live!
    • Jhonny's RadioDJ tutorials.
Re: How to bulk delete request entries?
« Reply #14 on: August 16, 2017, 04:54:47 PM »
Yes, I saw that too.
In my memory " " was used by a plugin for the weather that used it in the argument field, but that plugin did not work.
R.T.F.M. means to me, Read The Fantastic Messages.
Einstein says: Make things simple, but don't make simple things simpler! (wise) this is just my life lesson you know.

I don't do drugs, I do tuts. ( ͡° ͜ʖ ͡°) visit  https://radiodj.info

Testing RadioDJ v2.0.3.1 Beta