var database =
{
"data" :
[
{"Id" : 1 , "Name" : "John Doe" , "Email" : "johndoe@gmail.com" , "Phone" : *********** , "Department" : IT , Admission_Date: "1-1-2022"}
]
}
document.write("<tr>")
document.write("<td> + database.data[i].Id + "</td>")
document.write("<td> + database.data[i].Name + "</td>")
document.write("<td> + database.data[i].Email + "</td>")
document.write("<td> + database.data[i].Phone + "</td>")
document.write("<td> + database.data[i].Department + "</td>")
document.write("<td> + database.data[i].Admission_Date + "</td>")
document.write("</tr>")
if(database.data.length == 0)
{
document.getElementById("table").style.display = "none";
}
NOTE: Please Upvote my Answer!
/* Sqlite, MySQL, SQL */
const sqlite3 = require('sqlite3').verbose();
let db = new sqlite3.Database('DataBase');
let db = new sqlite3.Database('DataBase', (err) => {
if (err) { return console.error(err.message); }
console.log('Connected to the in-memory SQlite database.');
});