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
[MyMusic] Add A-Z categories to Artist view
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="Hesse" data-source="post: 78795" data-attributes="member: 23814"><p>The SQL code is quite easy if the developers want to add the index view. I'm working on a generic media module similar to in meedio and I've got the views pretty much working, I've just been busy lately and haven't had time to work on it.</p><p></p><p>For a top level view, you could use:</p><p></p><p>[CODE]</p><p>strSQL = String.Format("SELECT substr({0}, 1, 1) AS first, {5} FROM {1} GROUP BY first ORDER BY first {4}", MPCurrentItem.strGroupBy, MPCurrentItem.strTable, MPCurrentItem.strSortBy, MPCurrentItem.strSortBy, MPCurrentItem.strSortAsc, MPCurrentItem.strImageColumn);</p><p>[/CODE]</p><p></p><p>Then for the next level after the index, I use:</p><p></p><p>[CODE]</p><p>strSQL = String.Format("SELECT {0}, {7} FROM {1} WHERE substr({5}, 1, 1) LIKE '{6}' GROUP BY {2} ORDER BY {3} {4}", MPCurrentItem.strGroupBy, MPCurrentItem.strTable, MPCurrentItem.strSortBy, MPCurrentItem.strSortBy, MPCurrentItem.strSortAsc, MPPreviousItem.strSortBy, "{0}", MPCurrentItem.strImageColumn);</p><p>[/CODE]</p></blockquote><p></p>
[QUOTE="Hesse, post: 78795, member: 23814"] The SQL code is quite easy if the developers want to add the index view. I'm working on a generic media module similar to in meedio and I've got the views pretty much working, I've just been busy lately and haven't had time to work on it. For a top level view, you could use: [CODE] strSQL = String.Format("SELECT substr({0}, 1, 1) AS first, {5} FROM {1} GROUP BY first ORDER BY first {4}", MPCurrentItem.strGroupBy, MPCurrentItem.strTable, MPCurrentItem.strSortBy, MPCurrentItem.strSortBy, MPCurrentItem.strSortAsc, MPCurrentItem.strImageColumn); [/CODE] Then for the next level after the index, I use: [CODE] strSQL = String.Format("SELECT {0}, {7} FROM {1} WHERE substr({5}, 1, 1) LIKE '{6}' GROUP BY {2} ORDER BY {3} {4}", MPCurrentItem.strGroupBy, MPCurrentItem.strTable, MPCurrentItem.strSortBy, MPCurrentItem.strSortBy, MPCurrentItem.strSortAsc, MPPreviousItem.strSortBy, "{0}", MPCurrentItem.strImageColumn); [/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
Improvement Suggestions
[MyMusic] Add A-Z categories to Artist view
Contact us
RSS
Top
Bottom