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
Language specific support
Deutsches MediaPortal Forum
MediaPortal 1
TV / Streaming
Elektronischer Programmführer (EPG)
EPG-Buddy ein neues EPG Tool
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="MausWiesel" data-source="post: 1288679" data-attributes="member: 117562"><p>Guten Abend Gemeinde</p><p></p><p></p><p>Da ich zu den Leuten gehöre, die wegen verzweifeltem Umstieg auf eine Alternative schon alles gelöscht haben, möchte ich eine Codeverbesserung für den MySQL-Teil einreichen. Beim Überführen der Datenbank-Sendernamen in die Auswahlfelder wird über die falsche Spalte im Ergebnisfeld sortiert. Damit ist die Ausgabe in den Auswahlfeldern nicht zwingend in alphanumerischer Reihenfolge und ein Einrichten des Mappings wird dann u.U. sehr sehr undankbar.</p><p></p><p>[CODE]</p><p>Func _ReadData_Channelname_MySQL()</p><p>...</p><p> $array = _MySQL_Fetch_Result_StringArray($res)</p><p></p><p> ;old sorting (till 04.03.2022)</p><p> ;_ArraySort($array)</p><p></p><p> ;new sorting in 2nd column (= channel name)</p><p> _ArraySort($array, 0, 0, 0, 2)</p><p> </p><p> ;old: For $i = 1 to $rows</p><p> ;new: loop start/end modified</p><p> For $i = 0 to ($rows-1)</p><p> ;exclude query result header data row</p><p> If ($array[$i][0] <> "idGroup") And ($array[$i][1] <> "idChannel") And ($array[$i][2] <> "displayName") Then</p><p> GUICtrlSetData($combo_31_21, $array[$i][2], "----------")</p><p> GUICtrlSetData($combo_32_21, $array[$i][2], "----------")</p><p> GUICtrlSetData($combo_33_21, $array[$i][2], "----------")</p><p> GUICtrlSetData($combo_34_21, $array[$i][2], "----------")</p><p> GUICtrlSetData($combo_35_21, $array[$i][2], "----------")</p><p> GUICtrlSetData($combo_36_21, $array[$i][2], "----------")</p><p> GUICtrlSetData($combo_37_21, $array[$i][2], "----------")</p><p> EndIf</p><p> Next</p><p>...</p><p>[/CODE]</p><p></p><p>Bei der MySQL-Abfrage werden auch die Spaltennamen in der Ergebnistabelle mit ausgeben, so dass diese vor dem Eintragen in die Auswahlfelder noch herausgefiltert werden müssen. Ein ähnlicher Ansatz ist auch schon im SQLite-Teil für MP2 vorhanden.</p></blockquote><p></p>
[QUOTE="MausWiesel, post: 1288679, member: 117562"] Guten Abend Gemeinde Da ich zu den Leuten gehöre, die wegen verzweifeltem Umstieg auf eine Alternative schon alles gelöscht haben, möchte ich eine Codeverbesserung für den MySQL-Teil einreichen. Beim Überführen der Datenbank-Sendernamen in die Auswahlfelder wird über die falsche Spalte im Ergebnisfeld sortiert. Damit ist die Ausgabe in den Auswahlfeldern nicht zwingend in alphanumerischer Reihenfolge und ein Einrichten des Mappings wird dann u.U. sehr sehr undankbar. [CODE] Func _ReadData_Channelname_MySQL() ... $array = _MySQL_Fetch_Result_StringArray($res) ;old sorting (till 04.03.2022) ;_ArraySort($array) ;new sorting in 2nd column (= channel name) _ArraySort($array, 0, 0, 0, 2) ;old: For $i = 1 to $rows ;new: loop start/end modified For $i = 0 to ($rows-1) ;exclude query result header data row If ($array[$i][0] <> "idGroup") And ($array[$i][1] <> "idChannel") And ($array[$i][2] <> "displayName") Then GUICtrlSetData($combo_31_21, $array[$i][2], "----------") GUICtrlSetData($combo_32_21, $array[$i][2], "----------") GUICtrlSetData($combo_33_21, $array[$i][2], "----------") GUICtrlSetData($combo_34_21, $array[$i][2], "----------") GUICtrlSetData($combo_35_21, $array[$i][2], "----------") GUICtrlSetData($combo_36_21, $array[$i][2], "----------") GUICtrlSetData($combo_37_21, $array[$i][2], "----------") EndIf Next ... [/CODE] Bei der MySQL-Abfrage werden auch die Spaltennamen in der Ergebnistabelle mit ausgeben, so dass diese vor dem Eintragen in die Auswahlfelder noch herausgefiltert werden müssen. Ein ähnlicher Ansatz ist auch schon im SQLite-Teil für MP2 vorhanden. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Language specific support
Deutsches MediaPortal Forum
MediaPortal 1
TV / Streaming
Elektronischer Programmführer (EPG)
EPG-Buddy ein neues EPG Tool
Contact us
RSS
Top
Bottom