Kodi Community Forum
How to display Results of Query in a dialog.select box - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+--- Thread: How to display Results of Query in a dialog.select box (/showthread.php?tid=81976)



How to display Results of Query in a dialog.select box - teshephe - 2010-09-26

Seems pretty simple but having issues displaying the results of a query in a dialogue.

Quite simply... what is the best way to get results in a dialogue popup?

Here is my query code...
Code:
souce_list = []
            conn = sqlite3.connect(mavdb)
            c = conn.cursor()
            c.execute("""SELECT * FROM sources""")
            db=c.fetchall()
            for item in db:
                source = {}
                source["src_name"]
                source["src_hostip"]
                source["src_url"]
                source["src_type"]
                source["src_pid"]
                source["src_actflag"]
                source_list.append(source)
                c.close

            dialog = xbmcgui.Dialog()
            type = dialog.select(Addon.getLocalizedString( 30020 ), [source["name"]])
Thanks.Rolleyes