home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
Improvement Suggestions
Be able to select preferred card when scheduling a recording
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="pnyberg" data-source="post: 490030" data-attributes="member: 24255"><p>Came to think about triggers in MS SQL... I just added a trigger to my schedule table which enables me to set "recommendedcard" to what I want. Used this simple SQL statement:</p><p></p><p><strong>USE [MpTvDb]</strong></p><p><strong>GO</strong></p><p><strong>/****** Object: Trigger [dbo].[recommendedcard] Script Date: 07/26/2009 22:27:35 ******/</strong></p><p><strong>SET ANSI_NULLS ON</strong></p><p><strong>GO</strong></p><p><strong>SET QUOTED_IDENTIFIER ON</strong></p><p><strong>GO</strong></p><p><strong>-- =============================================</strong></p><p><strong>-- Author: Patrik</strong></p><p><strong>-- Create date: 2009-07-26</strong></p><p><strong>-- Description: Trigger to update recommended.card</strong></p><p><strong>-- =============================================</strong></p><p><strong>ALTER TRIGGER [dbo].[recommendedcard]</strong></p><p><strong> ON [dbo].[Schedule] </strong></p><p><strong> AFTER INSERT,UPDATE</strong></p><p><strong>AS </strong></p><p><strong>BEGIN</strong></p><p><strong> -- SET NOCOUNT ON added to prevent extra result sets from</strong></p><p><strong> -- interfering with SELECT statements.</strong></p><p><strong> SET NOCOUNT ON;</strong></p><p><strong></strong></p><p><strong> -- Insert statements for trigger here</strong></p><p><strong> Update dbo.schedule set recommendedcard=2</strong></p><p><strong>END</strong></p><p></p><p>I'm not sure if MySQL have triggers? Otherwise this should be fairly simple for the devs to incorporate in MP...?</p><p>You need to add a setting in the configuration program of the tvservice where you can set your recommendedcard and then create/alter the trigger?</p><p></p><p>Just a thought. But in the meantime this works for me.</p><p></p><p>Keep up the good work devs!</p></blockquote><p></p>
[QUOTE="pnyberg, post: 490030, member: 24255"] Came to think about triggers in MS SQL... I just added a trigger to my schedule table which enables me to set "recommendedcard" to what I want. Used this simple SQL statement: [B]USE [MpTvDb] GO /****** Object: Trigger [dbo].[recommendedcard] Script Date: 07/26/2009 22:27:35 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: Patrik -- Create date: 2009-07-26 -- Description: Trigger to update recommended.card -- ============================================= ALTER TRIGGER [dbo].[recommendedcard] ON [dbo].[Schedule] AFTER INSERT,UPDATE AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; -- Insert statements for trigger here Update dbo.schedule set recommendedcard=2 END[/B] I'm not sure if MySQL have triggers? Otherwise this should be fairly simple for the devs to incorporate in MP...? You need to add a setting in the configuration program of the tvservice where you can set your recommendedcard and then create/alter the trigger? Just a thought. But in the meantime this works for me. Keep up the good work devs! [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
Improvement Suggestions
Be able to select preferred card when scheduling a recording
Contact us
RSS
Top
Bottom