top of page
Create a table in MYSQL

Linux operation guide:

Connect mysql:

                  Command : mysql -u root -p

                  Password   : XYZPA

Exit mysql:

                  Command: exit

MYSQL

LINUX

Display Data From db on HTML Using Node.js

router.post('/B8C1A', async (req, res) => {

       let studentid = req.body.studentid

       let result = await SQLQuery(`Select * from B8C1A where studentID='${studentid}'`)

             .then((res) => {

                    return res

             })

              .catch((error) => {

              return error

             })

​

       res.send({

              code: 200,

              data: result,

              msg: "successful"

        })

})

                                                              FILE NAME: Index.js

LINUX

bottom of page