Web SQL

Developer
Size
1,983 Kb
Views
4,048

How do I make an web sql?

What is a web sql? How do you make a web sql? This script and codes were developed by Tommy on 30 December 2022, Friday.

Web SQL Previews

Web SQL - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Web SQL</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div> <button id="create">Create Table</button> <button id="insert">Insert Data</button> <button id="load">Load Data</button> </div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Web SQL - Script Codes JS Codes

 $(function(){ var dbName = 'Test1'; var version = '1.0'; var displayName = 'Test1'; var estimatedSize = 65536; function createTableIfNotExists(){ var db = openDB(); db.transaction( function(trans){ trans.executeSql( 'CREATE TABLE IF NOT EXISTS list ' + '( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, ' + ' name TEXT NOT NULL,' + ' email TEXT NOT NULL);' ); } ); } function insertData(){ var db = openDB(); db.transaction( function(trans){ trans.executeSql( 'INSERT INTO list (name, email) ' + 'VALUES ("foo","[email protected]");' ); } ); } function getData(){ var db = openDB(); db.transaction( function(trans){ trans.executeSql( 'SELECT * FROM list;', [], function(trans, r){ for(var i=0; i<r.rows.length; i++){ alert( 'id=' + r.rows.item(i).id + ' name: ' + r.rows.item(i).name + ' email: ' + r.rows.item(i).email ); } } ); } ); } function openDB(){ return openDatabase( dbName, version, displayName, estimatedSize); } $('#create').click(function(){ createTableIfNotExists(); }); $('#insert').click(function(){ insertData(); }); $('#load').click(function(){ getData(); }); });
Web SQL - Script Codes
Web SQL - Script Codes
Home Page Home
Developer Tommy
Username hoehoe
Uploaded December 30, 2022
Rating 3
Size 1,983 Kb
Views 4,048
Do you need developer help for Web SQL?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Tommy (hoehoe) Script Codes
Create amazing web content with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!