• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM-MysqlQuery module just released!

Scheduled Pinned Locked Moved Utilities
7 Posts 5 Posters 2.3k Views 5 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    ralberth
    last edited by Sep 11, 2018, 1:04 PM

    I just finished a new MySQL module, available at MMM-MysqlQuery.

    This queries a MySQL database you have access to on a regular basis, and displays the results as an HTML table on MagicMirror.

    Screenshots:
    Table

    Empty table

    1 Reply Last reply Reply Quote 2
    • F Offline
      Foguet
      last edited by Oct 5, 2018, 5:24 PM

      Just what I needed. Thank you for your contribution :winking_face:

      1 Reply Last reply Reply Quote 0
      • R Offline
        Richard238
        last edited by May 9, 2019, 3:58 PM

        Had to add a line:

        position: 'bottom_right'
        

        Now to make the SQL work with the Mysqli db I have running on an adjacent pi.

        1 Reply Last reply Reply Quote 0
        • R Offline
          Richard238
          last edited by May 10, 2019, 12:03 PM

          I have this module working quite well, just a couple of queries:

          How do you get the title “______________MYSQL SPICES” line displayed?
          I am getting just the table, not the title header line.

          And how might you change “Amt” form an integer, to a message saying “Too High” or Too low"?
          [I am actually measuring temperature and lux levels, but the principle’s the same.]

          Thank you.

          R 1 Reply Last reply May 20, 2019, 1:55 PM Reply Quote 0
          • R Offline
            Richard238 @Richard238
            last edited by May 20, 2019, 1:55 PM

            @Richard238 said in MMM-MysqlQuery module just released!:

            I have this module working quite well, just a couple of queries:

            How do you get the title “______________MYSQL SPICES” line displayed?
            I am getting just the table, not the title header line.

            And how might you change “Amt” form an integer, to a message saying “Too High” or Too low"?
            [I am actually measuring temperature and lux levels, but the principle’s the same.]

            Thank you.

            How do you get the title “______________MYSQL SPICES” line displayed?
            Fixed that one in config.js with header: 'Module Title',

            Other enhancements still need attention, if anyone can help, please?

            1 Reply Last reply Reply Quote 0
            • C Offline
              chris47803
              last edited by chris47803 May 13, 2021, 9:17 AM May 13, 2021, 9:15 AM

              Hello.
              Unfortunately, I only see my headings. The contents of my database are not displayed.

              {
                          module: 'MMM-MysqlQuery',
              			      position: "top_right",
              			      header: "Test",            
                          config: {
                              connection: {
                                  host: "192.168.2.1",
                                  port: 3306,
                                  user: "test",
                                  password: "test",
                                  database: "test"
                              },
                              query: `select titel, jahr from test order by titel
                                      limit 3`,
                  			intervalSeconds: 15 * 60,
                              emptyMessage: "No spices",
                              columns: [
                                  { name: "titel",      title: "Titel",  cssClass: "right" },
                                  { name: "jahr",      title: "Jahr",  cssClass: "right" },                    
              
                              ]
                          }
                      },
              
              S 1 Reply Last reply Feb 22, 2022, 2:34 PM Reply Quote 0
              • S Offline
                sifuhall @chris47803
                last edited by Feb 22, 2022, 2:34 PM

                @chris47803
                I have the same issue. Only the headings are displayed

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                Enjoying MagicMirror? Please consider a donation!
                MagicMirror created by Michael Teeuw.
                Forum managed by Sam, technical setup by Karsten.
                This forum is using NodeBB as its core | Contributors
                Contact | Privacy Policy